<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Yes, you are right not all drives are ata_host.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span>But if you connect a SATA drive it is assigned ata_host</span></div><br><span></span><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span>look at ahci driver and how it attaches to libata.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent;
 font-style: normal;">I am doing some custom work and I am not interested in recompiling kernel with <br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">ahci and libata compiled separately.</div><br><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span>Thanks</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span></span></div><br><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color:
 transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div dir="ltr"><br><hr size="1">  <font face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> "Valdis.Kletnieks@vt.edu" &lt;Valdis.Kletnieks@vt.edu&gt;<br> <b><span style="font-weight: bold;">To:</span></b> Com Developer &lt;comdeveloper@yahoo.com&gt; <br><b><span style="font-weight: bold;">Cc:</span></b> kernelnewbies &lt;kernelnewbies@kernelnewbies.org&gt; <br>
 <b><span style="font-weight: bold;">Sent:</span></b> Monday, August 19, 2013 11:09 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: /dev/sda to ata_host<br> </font> </div> <div class="y_msg_container"><br>
On Mon, 19 Aug 2013 15:41:15 -0700, Com Developer said:<br>&gt; Is there any way to reverse map device name&nbsp; /dev/sda to a the ata_host<br>&gt; structure the drive is attached to?<br><br>What problem are you trying to solve with this reverse mapping?<br><br>(Hint - I'm not convinced that all devices named /dev/sd* have an ata_host<br>structure.&nbsp; I'm reasonably sure that the large disk arrays I have on some systems<br>at work are *not* ATA, as they present as SCSI fiberchannel devices.<br><br>% ls -l /dev/sdaaw<br>brw-r----- 1 root disk 133, 576 Aug 17 07:57 /dev/sdaaw<br><br>and dmesg tells me:<br><br>&nbsp; Vendor: IBM&nbsp; &nbsp; &nbsp;  Model: DCS9550&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Rev: 4.03<br>&nbsp; Type:&nbsp;  Direct-Access&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ANSI SCSI revision: 05<br>sdaaw : very big device. try to use READ CAPACITY(16).<br>SCSI device sdaaw: 15628087296 512-byte hdwr sectors
 (8001581 MB)<br>sdaaw: Write Protect is off<br>sdaaw: Mode Sense: a7 00 10 08<br>SCSI device sdaaw: drive cache: write through w/ FUA<br>sdaaw : very big device. try to use READ CAPACITY(16).<br>SCSI device sdaaw: 15628087296 512-byte hdwr sectors (8001581 MB)<br>sdaaw: Write Protect is off<br>sdaaw: Mode Sense: a7 00 10 08<br>SCSI device sdaaw: drive cache: write through w/ FUA<br> sdaaw: unknown partition table<br>sd 3:0:7:96: Attached scsi disk sdaaw<br>sd 3:0:7:96: Attached scsi generic sg731 type 0<br><br>I'm suspecting there's no ata_host involved here, as we never notice it<br>as an ATA drive.<br><br>(And no, that device name isn't a boo-boo - the box really *does*<br>have visibility to 768 8T LUNs (OK, so it's actually 8 fiberchannel<br>paths to 96 LUNs. ;) <br><br><br><br><br></div> </div> </div>  </div></body></html>