Re: Advanced Format SAT devices show incorrect physical block size

2017-02-23 Thread Pali Rohár
On Monday 30 January 2017 18:43:12 Pali Rohár wrote: > On Monday 30 January 2017 17:17:03 Alan Stern wrote: > > On Sun, 29 Jan 2017, Pali Rohár wrote: > > > On Wednesday 11 January 2017 16:23:29 Alan Stern wrote: > > > > On Tue, 10 Jan 2017, James Bottomley wrote: > > > > > On Tue, 2017-01-10 at 16

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-30 Thread Pali Rohár
On Monday 30 January 2017 17:17:03 Alan Stern wrote: > On Sun, 29 Jan 2017, Pali Rohár wrote: > > On Wednesday 11 January 2017 16:23:29 Alan Stern wrote: > > > On Tue, 10 Jan 2017, James Bottomley wrote: > > > > On Tue, 2017-01-10 at 16:00 -0500, Alan Stern wrote: > > > > > In theory, I suppose we

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-30 Thread Alan Stern
On Sun, 29 Jan 2017, Pali Rohár wrote: > On Wednesday 11 January 2017 16:23:29 Alan Stern wrote: > > On Tue, 10 Jan 2017, James Bottomley wrote: > > > On Tue, 2017-01-10 at 16:00 -0500, Alan Stern wrote: > > > > In theory, I suppose we could change the kernel so that it would > > > > default to RE

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-29 Thread Pali Rohár
On Wednesday 11 January 2017 16:23:29 Alan Stern wrote: > On Tue, 10 Jan 2017, James Bottomley wrote: > > On Tue, 2017-01-10 at 16:00 -0500, Alan Stern wrote: > > > In theory, I suppose we could change the kernel so that it would > > > default to READ CAPACITY(16) for devices that report a SCSI lev

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-11 Thread Alan Stern
On Tue, 10 Jan 2017, James Bottomley wrote: > On Tue, 2017-01-10 at 16:00 -0500, Alan Stern wrote: > > In theory, I suppose we could change the kernel so that it would > > default to READ CAPACITY(16) for devices that report a SCSI level >= > > 3, or something along those lines. In general we h

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-11 Thread Alan Stern
On Wed, 11 Jan 2017, Pali Rohár wrote: > On Tuesday 10 January 2017 15:29:23 Alan Stern wrote: > > > Tom Yan wrote that smartctl/hdparm "works" because they use the SCSI ATA > > > PASSTHROUGH command. It is not an option for kernel? > > > > No, because many devices do not implement SCSI ATA PASST

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-11 Thread Alan Stern
On Tue, 10 Jan 2017, Dainius Masiliūnas wrote: > On Tue, Jan 10, 2017 at 9:00 PM, Alan Stern wrote: > > It is used for preventing the kernel from issuing a READ CAPACITY(16) > > command to the device. Normally the kernel would do this if the reply > > to READ CAPACITY(10) indicated there were mo

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-11 Thread Pali Rohár
On Tuesday 10 January 2017 15:29:23 Alan Stern wrote: > > Tom Yan wrote that smartctl/hdparm "works" because they use the SCSI ATA > > PASSTHROUGH command. It is not an option for kernel? > > No, because many devices do not implement SCSI ATA PASSTHROUGH. > (Consider devices whose underlying tec

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-11 Thread Pali Rohár
On Tuesday 10 January 2017 14:12:25 James Bottomley wrote: > On Tue, 2017-01-10 at 16:00 -0500, Alan Stern wrote: > > In theory, I suppose we could change the kernel so that it would > > default to READ CAPACITY(16) for devices that report a SCSI level >= > > 3, or something along those lines. I

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-10 Thread James Bottomley
On Tue, 2017-01-10 at 16:00 -0500, Alan Stern wrote: > In theory, I suppose we could change the kernel so that it would > default to READ CAPACITY(16) for devices that report a SCSI level >= > 3, or something along those lines. In general we hesitate to make > changes of this sort, because they

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-10 Thread Dainius Masiliūnas
On Tue, Jan 10, 2017 at 9:00 PM, Alan Stern wrote: > It is used for preventing the kernel from issuing a READ CAPACITY(16) > command to the device. Normally the kernel would do this if the reply > to READ CAPACITY(10) indicated there were more than 2^32 blocks (about > 2 TB). Ah, OK, that makes

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-10 Thread Alan Stern
On Tue, 10 Jan 2017, Dainius Masiliūnas wrote: > (I pressed reply instead of reply to all, sorry. Resending this.) > > On Tue, Jan 10, 2017 at 8:29 PM, Alan Stern wrote: > > There _is_ a quirk for broken models. However, we don't know how > > complete the set of quirk entries is, so we err on t

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-10 Thread Dainius Masiliūnas
(I pressed reply instead of reply to all, sorry. Resending this.) On Tue, Jan 10, 2017 at 8:29 PM, Alan Stern wrote: > There _is_ a quirk for broken models. However, we don't know how > complete the set of quirk entries is, so we err on the side of caution. Then what is it used for? There doesn

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-10 Thread Alan Stern
On Tue, 10 Jan 2017, Dainius Masiliūnas wrote: > Huh, intersting to know. Why would they die on 16 and not on 10? Also, Probably because they are too old to support READ CAPACITY(16) correctly. > wouldn't the right way to handle it be to use a quirk for broken > models, then? Since my disk seem

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-10 Thread Pali Rohár
On Tuesday 10 January 2017 21:02:09 Alan Stern wrote: > Quick summary: READ CAPACITY(10) does not include physical sector > size information whereas READ CAPACITY(16) does. But the kernel > uses READ CAPACITY(10) by default for USB drives, because quite a > few of them die when given a READ CAPACI

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-10 Thread Dainius Masiliūnas
Huh, intersting to know. Why would they die on 16 and not on 10? Also, wouldn't the right way to handle it be to use a quirk for broken models, then? Since my disk seems to work fine in that regard. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to

Re: Advanced Format SAT devices show incorrect physical block size

2017-01-10 Thread Alan Stern
On Tue, 10 Jan 2017, Pali Rohár wrote: > Per Tom Yan suggestion I'm forwarding bug from bugzilla to this ML: > https://bugzilla.kernel.org/show_bug.cgi?id=102271 This really should be sent to the linux-scsi mailing list (CC'ed) as well as to linux-usb. > === Dainius Masiliūnas wrote: === > >

Advanced Format SAT devices show incorrect physical block size

2017-01-10 Thread Pali Rohár
Per Tom Yan suggestion I'm forwarding bug from bugzilla to this ML: https://bugzilla.kernel.org/show_bug.cgi?id=102271 === Dainius Masiliūnas wrote: === When using an Advanced Format drive connected through a SCSI-to-ATA Translation device, the physical block size reported by the kernel (in /