Skip to content

Commit 4c3fc34

Browse files
committed
Merge tag 'ata-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux
Pull ata fixes from Damien Le Moal: - Compilation warning fixes from Arnd: one in the sata_sx4 driver due to an incorrect calculation of the parameters passed to memcpy() and another one in the sata_mv driver when CONFIG_PCI is not set - Drop the owner driver field assignment in the pata_macio driver. That is not needed as the PCI core code does that already (Krzysztof) - Remove an unusued field in struct st_ahci_drv_data of the ahci_st driver (Christophe) - Add a missing clock probe error check in the sata_gemini driver (Chen) * tag 'ata-6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: ata: sata_gemini: Check clk_enable() result ata: sata_mv: Fix PCI device ID table declaration compilation warning ata: ahci_st: Remove an unused field in struct st_ahci_drv_data ata: pata_macio: drop driver owner assignment ata: sata_sx4: fix pdc20621_get_from_dimm() on 64-bit
2 parents c42881d + e85006a commit 4c3fc34

File tree

5 files changed

+37
-41
lines changed

5 files changed

+37
-41
lines changed

drivers/ata/ahci_st.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#define ST_AHCI_OOBR_CIMAX_SHIFT 0
3131

3232
struct st_ahci_drv_data {
33-
struct platform_device *ahci;
3433
struct reset_control *pwr;
3534
struct reset_control *sw_rst;
3635
struct reset_control *pwr_rst;

drivers/ata/pata_macio.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,9 +1371,6 @@ static struct pci_driver pata_macio_pci_driver = {
13711371
.suspend = pata_macio_pci_suspend,
13721372
.resume = pata_macio_pci_resume,
13731373
#endif
1374-
.driver = {
1375-
.owner = THIS_MODULE,
1376-
},
13771374
};
13781375
MODULE_DEVICE_TABLE(pci, pata_macio_pci_match);
13791376

drivers/ata/sata_gemini.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,10 @@ int gemini_sata_start_bridge(struct sata_gemini *sg, unsigned int bridge)
200200
pclk = sg->sata0_pclk;
201201
else
202202
pclk = sg->sata1_pclk;
203-
clk_enable(pclk);
203+
ret = clk_enable(pclk);
204+
if (ret)
205+
return ret;
206+
204207
msleep(10);
205208

206209
/* Do not keep clocking a bridge that is not online */

drivers/ata/sata_mv.c

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -787,37 +787,6 @@ static const struct ata_port_info mv_port_info[] = {
787787
},
788788
};
789789

790-
static const struct pci_device_id mv_pci_tbl[] = {
791-
{ PCI_VDEVICE(MARVELL, 0x5040), chip_504x },
792-
{ PCI_VDEVICE(MARVELL, 0x5041), chip_504x },
793-
{ PCI_VDEVICE(MARVELL, 0x5080), chip_5080 },
794-
{ PCI_VDEVICE(MARVELL, 0x5081), chip_508x },
795-
/* RocketRAID 1720/174x have different identifiers */
796-
{ PCI_VDEVICE(TTI, 0x1720), chip_6042 },
797-
{ PCI_VDEVICE(TTI, 0x1740), chip_6042 },
798-
{ PCI_VDEVICE(TTI, 0x1742), chip_6042 },
799-
800-
{ PCI_VDEVICE(MARVELL, 0x6040), chip_604x },
801-
{ PCI_VDEVICE(MARVELL, 0x6041), chip_604x },
802-
{ PCI_VDEVICE(MARVELL, 0x6042), chip_6042 },
803-
{ PCI_VDEVICE(MARVELL, 0x6080), chip_608x },
804-
{ PCI_VDEVICE(MARVELL, 0x6081), chip_608x },
805-
806-
{ PCI_VDEVICE(ADAPTEC2, 0x0241), chip_604x },
807-
808-
/* Adaptec 1430SA */
809-
{ PCI_VDEVICE(ADAPTEC2, 0x0243), chip_7042 },
810-
811-
/* Marvell 7042 support */
812-
{ PCI_VDEVICE(MARVELL, 0x7042), chip_7042 },
813-
814-
/* Highpoint RocketRAID PCIe series */
815-
{ PCI_VDEVICE(TTI, 0x2300), chip_7042 },
816-
{ PCI_VDEVICE(TTI, 0x2310), chip_7042 },
817-
818-
{ } /* terminate list */
819-
};
820-
821790
static const struct mv_hw_ops mv5xxx_ops = {
822791
.phy_errata = mv5_phy_errata,
823792
.enable_leds = mv5_enable_leds,
@@ -4303,6 +4272,36 @@ static int mv_pci_init_one(struct pci_dev *pdev,
43034272
static int mv_pci_device_resume(struct pci_dev *pdev);
43044273
#endif
43054274

4275+
static const struct pci_device_id mv_pci_tbl[] = {
4276+
{ PCI_VDEVICE(MARVELL, 0x5040), chip_504x },
4277+
{ PCI_VDEVICE(MARVELL, 0x5041), chip_504x },
4278+
{ PCI_VDEVICE(MARVELL, 0x5080), chip_5080 },
4279+
{ PCI_VDEVICE(MARVELL, 0x5081), chip_508x },
4280+
/* RocketRAID 1720/174x have different identifiers */
4281+
{ PCI_VDEVICE(TTI, 0x1720), chip_6042 },
4282+
{ PCI_VDEVICE(TTI, 0x1740), chip_6042 },
4283+
{ PCI_VDEVICE(TTI, 0x1742), chip_6042 },
4284+
4285+
{ PCI_VDEVICE(MARVELL, 0x6040), chip_604x },
4286+
{ PCI_VDEVICE(MARVELL, 0x6041), chip_604x },
4287+
{ PCI_VDEVICE(MARVELL, 0x6042), chip_6042 },
4288+
{ PCI_VDEVICE(MARVELL, 0x6080), chip_608x },
4289+
{ PCI_VDEVICE(MARVELL, 0x6081), chip_608x },
4290+
4291+
{ PCI_VDEVICE(ADAPTEC2, 0x0241), chip_604x },
4292+
4293+
/* Adaptec 1430SA */
4294+
{ PCI_VDEVICE(ADAPTEC2, 0x0243), chip_7042 },
4295+
4296+
/* Marvell 7042 support */
4297+
{ PCI_VDEVICE(MARVELL, 0x7042), chip_7042 },
4298+
4299+
/* Highpoint RocketRAID PCIe series */
4300+
{ PCI_VDEVICE(TTI, 0x2300), chip_7042 },
4301+
{ PCI_VDEVICE(TTI, 0x2310), chip_7042 },
4302+
4303+
{ } /* terminate list */
4304+
};
43064305

43074306
static struct pci_driver mv_pci_driver = {
43084307
.name = DRV_NAME,
@@ -4315,6 +4314,7 @@ static struct pci_driver mv_pci_driver = {
43154314
#endif
43164315

43174316
};
4317+
MODULE_DEVICE_TABLE(pci, mv_pci_tbl);
43184318

43194319
/**
43204320
* mv_print_info - Dump key info to kernel log for perusal.
@@ -4487,7 +4487,6 @@ static void __exit mv_exit(void)
44874487
MODULE_AUTHOR("Brett Russ");
44884488
MODULE_DESCRIPTION("SCSI low-level driver for Marvell SATA controllers");
44894489
MODULE_LICENSE("GPL v2");
4490-
MODULE_DEVICE_TABLE(pci, mv_pci_tbl);
44914490
MODULE_VERSION(DRV_VERSION);
44924491
MODULE_ALIAS("platform:" DRV_NAME);
44934492

drivers/ata/sata_sx4.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -957,8 +957,7 @@ static void pdc20621_get_from_dimm(struct ata_host *host, void *psource,
957957

958958
offset -= (idx * window_size);
959959
idx++;
960-
dist = ((long) (window_size - (offset + size))) >= 0 ? size :
961-
(long) (window_size - offset);
960+
dist = min(size, window_size - offset);
962961
memcpy_fromio(psource, dimm_mmio + offset / 4, dist);
963962

964963
psource += dist;
@@ -1005,8 +1004,7 @@ static void pdc20621_put_to_dimm(struct ata_host *host, void *psource,
10051004
readl(mmio + PDC_DIMM_WINDOW_CTLR);
10061005
offset -= (idx * window_size);
10071006
idx++;
1008-
dist = ((long)(s32)(window_size - (offset + size))) >= 0 ? size :
1009-
(long) (window_size - offset);
1007+
dist = min(size, window_size - offset);
10101008
memcpy_toio(dimm_mmio + offset / 4, psource, dist);
10111009
writel(0x01, mmio + PDC_GENERAL_CTLR);
10121010
readl(mmio + PDC_GENERAL_CTLR);

0 commit comments

Comments
 (0)