Re: [PATCH 1/2] ata: Fix ZBC_OUT command block check

2018-06-26 Thread Greg KH
On Tue, Jun 26, 2018 at 04:18:37PM +0900, Damien Le Moal wrote: > The block (LBA) specified must not exceed the last addressable LBA, > which is dev->nr_sectors - 1. So fix the correct check is > "if (block >= dev->n_sectors)" and not "if (block > dev->n_sectords)". > > Additionally, the asc/ascq

[PATCH 1/2] ata: Fix ZBC_OUT command block check

2018-06-26 Thread Damien Le Moal
The block (LBA) specified must not exceed the last addressable LBA, which is dev->nr_sectors - 1. So fix the correct check is "if (block >= dev->n_sectors)" and not "if (block > dev->n_sectords)". Additionally, the asc/ascq to return for an LBA that is not a zone start LBA should be ILLEGAL