/dev/sda to ata_host

Com Developer comdeveloper at yahoo.com
Tue Aug 20 03:25:24 EDT 2013


Yes, you are right not all drives are ata_host.
But if you connect a SATA drive it is assigned ata_host

look at ahci driver and how it attaches to libata.

I am doing some custom work and I am not interested in recompiling kernel with 

ahci and libata compiled separately.


Thanks






________________________________
 From: "Valdis.Kletnieks at vt.edu" <Valdis.Kletnieks at vt.edu>
To: Com Developer <comdeveloper at yahoo.com> 
Cc: kernelnewbies <kernelnewbies at kernelnewbies.org> 
Sent: Monday, August 19, 2013 11:09 PM
Subject: Re: /dev/sda to ata_host
 

On Mon, 19 Aug 2013 15:41:15 -0700, Com Developer said:
> Is there any way to reverse map device name  /dev/sda to a the ata_host
> structure the drive is attached to?

What problem are you trying to solve with this reverse mapping?

(Hint - I'm not convinced that all devices named /dev/sd* have an ata_host
structure.  I'm reasonably sure that the large disk arrays I have on some systems
at work are *not* ATA, as they present as SCSI fiberchannel devices.

% ls -l /dev/sdaaw
brw-r----- 1 root disk 133, 576 Aug 17 07:57 /dev/sdaaw

and dmesg tells me:

  Vendor: IBM       Model: DCS9550           Rev: 4.03
  Type:   Direct-Access                      ANSI SCSI revision: 05
sdaaw : very big device. try to use READ CAPACITY(16).
SCSI device sdaaw: 15628087296 512-byte hdwr sectors (8001581 MB)
sdaaw: Write Protect is off
sdaaw: Mode Sense: a7 00 10 08
SCSI device sdaaw: drive cache: write through w/ FUA
sdaaw : very big device. try to use READ CAPACITY(16).
SCSI device sdaaw: 15628087296 512-byte hdwr sectors (8001581 MB)
sdaaw: Write Protect is off
sdaaw: Mode Sense: a7 00 10 08
SCSI device sdaaw: drive cache: write through w/ FUA
sdaaw: unknown partition table
sd 3:0:7:96: Attached scsi disk sdaaw
sd 3:0:7:96: Attached scsi generic sg731 type 0

I'm suspecting there's no ata_host involved here, as we never notice it
as an ATA drive.

(And no, that device name isn't a boo-boo - the box really *does*
have visibility to 768 8T LUNs (OK, so it's actually 8 fiberchannel
paths to 96 LUNs. ;) 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130820/d8cc35d4/attachment-0001.html 


More information about the Kernelnewbies mailing list