Re: [PATCH] libata: automatically use DMADIR if drive/bridge requires it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tejun Heo wrote:
> Back in 2.6.17-rc2, a libata module parameter was added for atapi_dmadir.
> 
> That's nice, but most SATA devices which need it will tell us about it
> in their IDENTIFY PACKET response, as bit-15 of word-62 of the
> returned data (as per ATA7, ATA8 specifications).
> 
> So for those which specify it, we should automatically use the DMADIR bit.
> Otherwise, disc writing will fail by default on many SATA-ATAPI drives.
> 
> This patch adds ATA_DFLAG_DMADIR and make ata_dev_configure() set it
> if atapi_dmadir is set or identify data indicates DMADIR is necessary.
> atapi_xlat() is converted to check ATA_DFLAG_DMADIR before setting
> DMADIR.
> 
> Original patch is from Mark Lord.
> 
> Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>
> Cc: Mark Lord <mlord@xxxxxxxxx>
> ---
> I don't have a bridge which sets DMADIR but so only checked atapi_dmadir
> parameter.  Thanks.
> 

The patch looks good. However, it seems there is no realworld IDE-to-SATA
bridge that requires DMADIR and also mangles IDENTIFY PACKET bit-15 of
word-62 to indicate its presence.

>From the previous test of the IDE-to-SATA bridges, only the Sil 3611
requires the host software to hint on ATAPI DMADIR. But Sil 3611 doesn't
mangle IDENTIFY PACKET word-62:
http://www.spinics.net/lists/linux-ide/msg01514.html

Maybe we could use ata_dev_knobble() instead? i.e. If it's an ATAPI
device && ata_dev_knobble() then we turn on DMADIR (regardless the
bridge chip used since setting DMADIR won't hurt those don't need it.)
--
albert

-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux