Re: [Regression] 2.6.25-rc4-git3: Handling of audio CDs broken on pata_ali

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

 



Tejun Heo wrote:
> Tejun Heo wrote:
>> Rafael J. Wysocki wrote:
>>>>> where ata1 is:
>>>>>
>>>>> scsi0 : pata_ali
>>>>> scsi1 : pata_ali
>>>> Oh, is it only with audio CDs? I am unable to use DVD on pata_ali in DMA at
>>>> all. Have you tried to disable ATAPI DMA (libata.dma=1)?
>>> Data CDs seem to work fine here.
>> * Does booting into runlevel 1, putting in an audio cd and running
>> cdparanoia give the same result?
>>
>> * Does setting module parameter libata.force to "1.00:pio4" make any
>> difference?
> 
> Oh, never mind.  I have a hunch.  I'll report back in a while.
> 

Does the attached patch fix the problem?

-- 
tejun
 drivers/ata/pata_ali.c    |    2 +-
 drivers/ata/pata_it821x.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index 7e68edf..8786455 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -295,7 +295,7 @@ static void ali_lock_sectors(struct ata_device *adev)
 static int ali_check_atapi_dma(struct ata_queued_cmd *qc)
 {
 	/* If its not a media command, its not worth it */
-	if (qc->nbytes < 2048)
+	if (atapi_cmd_type(qc->cdb[0]) == ATAPI_MISC)
 		return -EOPNOTSUPP;
 	return 0;
 }
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index 109ddd4..f751749 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -564,7 +564,7 @@ static int it821x_check_atapi_dma(struct ata_queued_cmd *qc)
 	struct it821x_dev *itdev = ap->private_data;
 
 	/* Only use dma for transfers to/from the media. */
-	if (qc->nbytes < 2048)
+	if (atapi_cmd_type(qc->cdb[0]) == ATAPI_MISC)
 		return -EOPNOTSUPP;
 
 	/* No ATAPI DMA in smart mode */

[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