Skip to content

Commit 61f90a8

Browse files
committed
Merge tag 'libata-5.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata
Pull libata updates from Damien Le Moal: - Remove duplicated AHCI adapter PCI device IDs (from Krzysztof) - Cleanup of device DMA state checking to consistantly use ata_dma_enabled() (from Reimar) * tag 'libata-5.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: pata_radisys: fix checking of DMA state pata_optidma: fix checking of DMA state pata_amd: fix checking of DMA state pata_ali: fix checking of DMA state libata-scsi: fix checking of DMA state libata: fix checking of DMA state Add AHCI support for ASM1062+JBM575 cards ahci: remove duplicated PCI device IDs
2 parents cc0356d + 1af5f7a commit 61f90a8

File tree

7 files changed

+15
-18
lines changed

7 files changed

+15
-18
lines changed

drivers/ata/ahci.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
258258
{ PCI_VDEVICE(INTEL, 0x2683), board_ahci }, /* ESB2 */
259259
{ PCI_VDEVICE(INTEL, 0x27c6), board_ahci }, /* ICH7-M DH */
260260
{ PCI_VDEVICE(INTEL, 0x2821), board_ahci }, /* ICH8 */
261-
{ PCI_VDEVICE(INTEL, 0x2822), board_ahci_nosntf }, /* ICH8 */
261+
{ PCI_VDEVICE(INTEL, 0x2822), board_ahci_nosntf }, /* ICH8/Lewisburg RAID*/
262262
{ PCI_VDEVICE(INTEL, 0x2824), board_ahci }, /* ICH8 */
263263
{ PCI_VDEVICE(INTEL, 0x2829), board_ahci }, /* ICH8M */
264264
{ PCI_VDEVICE(INTEL, 0x282a), board_ahci }, /* ICH8M */
@@ -316,7 +316,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
316316
{ PCI_VDEVICE(INTEL, 0x1d02), board_ahci }, /* PBG AHCI */
317317
{ PCI_VDEVICE(INTEL, 0x1d04), board_ahci }, /* PBG RAID */
318318
{ PCI_VDEVICE(INTEL, 0x1d06), board_ahci }, /* PBG RAID */
319-
{ PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* PBG RAID */
319+
{ PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* PBG/Lewisburg RAID*/
320320
{ PCI_VDEVICE(INTEL, 0x2323), board_ahci }, /* DH89xxCC AHCI */
321321
{ PCI_VDEVICE(INTEL, 0x1e02), board_ahci }, /* Panther Point AHCI */
322322
{ PCI_VDEVICE(INTEL, 0x1e03), board_ahci_mobile }, /* Panther M AHCI */
@@ -358,8 +358,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
358358
{ PCI_VDEVICE(INTEL, 0x1f37), board_ahci_avn }, /* Avoton RAID */
359359
{ PCI_VDEVICE(INTEL, 0x1f3e), board_ahci_avn }, /* Avoton RAID */
360360
{ PCI_VDEVICE(INTEL, 0x1f3f), board_ahci_avn }, /* Avoton RAID */
361-
{ PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Wellsburg RAID */
362-
{ PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Wellsburg RAID */
361+
{ PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Wellsburg/Lewisburg AHCI*/
362+
{ PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Wellsburg/Lewisburg RAID*/
363363
{ PCI_VDEVICE(INTEL, 0x43d4), board_ahci }, /* Rocket Lake PCH-H RAID */
364364
{ PCI_VDEVICE(INTEL, 0x43d5), board_ahci }, /* Rocket Lake PCH-H RAID */
365365
{ PCI_VDEVICE(INTEL, 0x43d6), board_ahci }, /* Rocket Lake PCH-H RAID */
@@ -394,10 +394,6 @@ static const struct pci_device_id ahci_pci_tbl[] = {
394394
{ PCI_VDEVICE(INTEL, 0xa106), board_ahci }, /* Sunrise Point-H RAID */
395395
{ PCI_VDEVICE(INTEL, 0xa107), board_ahci_mobile }, /* Sunrise M RAID */
396396
{ PCI_VDEVICE(INTEL, 0xa10f), board_ahci }, /* Sunrise Point-H RAID */
397-
{ PCI_VDEVICE(INTEL, 0x2822), board_ahci }, /* Lewisburg RAID*/
398-
{ PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Lewisburg AHCI*/
399-
{ PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* Lewisburg RAID*/
400-
{ PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Lewisburg RAID*/
401397
{ PCI_VDEVICE(INTEL, 0xa182), board_ahci }, /* Lewisburg AHCI*/
402398
{ PCI_VDEVICE(INTEL, 0xa186), board_ahci }, /* Lewisburg RAID*/
403399
{ PCI_VDEVICE(INTEL, 0xa1d2), board_ahci }, /* Lewisburg RAID*/
@@ -592,6 +588,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
592588
{ PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */
593589
{ PCI_VDEVICE(ASMEDIA, 0x0621), board_ahci }, /* ASM1061R */
594590
{ PCI_VDEVICE(ASMEDIA, 0x0622), board_ahci }, /* ASM1062R */
591+
{ PCI_VDEVICE(ASMEDIA, 0x0624), board_ahci }, /* ASM1062+JMB575 */
595592

596593
/*
597594
* Samsung SSDs found on some macbooks. NCQ times out if MSI is

drivers/ata/libata-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2007,7 +2007,7 @@ unsigned int ata_read_log_page(struct ata_device *dev, u8 log,
20072007

20082008
retry:
20092009
ata_tf_init(dev, &tf);
2010-
if (dev->dma_mode && ata_id_has_read_log_dma_ext(dev->id) &&
2010+
if (ata_dma_enabled(dev) && ata_id_has_read_log_dma_ext(dev->id) &&
20112011
!(dev->horkage & ATA_HORKAGE_NO_DMA_LOG)) {
20122012
tf.command = ATA_CMD_READ_LOG_DMA_EXT;
20132013
tf.protocol = ATA_PROT_DMA;

drivers/ata/libata-scsi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3005,7 +3005,7 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
30053005
ata_qc_set_pc_nbytes(qc);
30063006

30073007
/* We may not issue DMA commands if no DMA mode is set */
3008-
if (tf->protocol == ATA_PROT_DMA && dev->dma_mode == 0) {
3008+
if (tf->protocol == ATA_PROT_DMA && !ata_dma_enabled(dev)) {
30093009
fp = 1;
30103010
goto invalid_fld;
30113011
}
@@ -3155,7 +3155,7 @@ static unsigned int ata_scsi_write_same_xlat(struct ata_queued_cmd *qc)
31553155
u8 unmap = cdb[1] & 0x8;
31563156

31573157
/* we may not issue DMA commands if no DMA mode is set */
3158-
if (unlikely(!dev->dma_mode))
3158+
if (unlikely(!ata_dma_enabled(dev)))
31593159
goto invalid_opcode;
31603160

31613161
/*

drivers/ata/pata_ali.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ static void ali_set_piomode(struct ata_port *ap, struct ata_device *adev)
215215
struct ata_timing p;
216216
ata_timing_compute(pair, pair->pio_mode, &p, T, 1);
217217
ata_timing_merge(&p, &t, &t, ATA_TIMING_SETUP|ATA_TIMING_8BIT);
218-
if (pair->dma_mode) {
218+
if (ata_dma_enabled(pair)) {
219219
ata_timing_compute(pair, pair->dma_mode, &p, T, 1);
220220
ata_timing_merge(&p, &t, &t, ATA_TIMING_SETUP|ATA_TIMING_8BIT);
221221
}
@@ -264,7 +264,7 @@ static void ali_set_dmamode(struct ata_port *ap, struct ata_device *adev)
264264
struct ata_timing p;
265265
ata_timing_compute(pair, pair->pio_mode, &p, T, 1);
266266
ata_timing_merge(&p, &t, &t, ATA_TIMING_SETUP|ATA_TIMING_8BIT);
267-
if (pair->dma_mode) {
267+
if (ata_dma_enabled(pair)) {
268268
ata_timing_compute(pair, pair->dma_mode, &p, T, 1);
269269
ata_timing_merge(&p, &t, &t, ATA_TIMING_SETUP|ATA_TIMING_8BIT);
270270
}

drivers/ata/pata_amd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static void timing_setup(struct ata_port *ap, struct ata_device *adev, int offse
6666

6767
if (peer) {
6868
/* This may be over conservative */
69-
if (peer->dma_mode) {
69+
if (ata_dma_enabled(peer)) {
7070
ata_timing_compute(peer, peer->dma_mode, &apeer, T, UT);
7171
ata_timing_merge(&apeer, &at, &at, ATA_TIMING_8BIT);
7272
}

drivers/ata/pata_optidma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static void optidma_mode_setup(struct ata_port *ap, struct ata_device *adev, u8
153153
if (pair) {
154154
u8 pair_addr;
155155
/* Hardware constraint */
156-
if (pair->dma_mode)
156+
if (ata_dma_enabled(pair))
157157
pair_addr = 0;
158158
else
159159
pair_addr = addr_timing[pci_clock][pair->pio_mode - XFER_PIO_0];
@@ -301,7 +301,7 @@ static u8 optidma_make_bits43(struct ata_device *adev)
301301
};
302302
if (!ata_dev_enabled(adev))
303303
return 0;
304-
if (adev->dma_mode)
304+
if (ata_dma_enabled(adev))
305305
return adev->dma_mode - XFER_MW_DMA_0;
306306
return bits43[adev->pio_mode - XFER_PIO_0];
307307
}

drivers/ata/pata_radisys.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ static unsigned int radisys_qc_issue(struct ata_queued_cmd *qc)
172172

173173
if (adev != ap->private_data) {
174174
/* UDMA timing is not shared */
175-
if (adev->dma_mode < XFER_UDMA_0) {
176-
if (adev->dma_mode)
175+
if (adev->dma_mode < XFER_UDMA_0 || !ata_dma_enabled(adev)) {
176+
if (ata_dma_enabled(adev))
177177
radisys_set_dmamode(ap, adev);
178178
else if (adev->pio_mode)
179179
radisys_set_piomode(ap, adev);

0 commit comments

Comments
 (0)