mirror of https://github.com/torvalds/linux.git
The pata_macio driver advertises a max_segment_size of 0xff00, because
the hardware doesn't cope with requests >= 64K.
However the SCSI core requires max_segment_size to be at least
PAGE_SIZE, which is a problem for pata_macio when the kernel is built
with 64K pages.
In older kernels the SCSI core would just increase the segment size to
be equal to PAGE_SIZE, however since the commit tagged below it causes a
warning and the device fails to probe:
WARNING: CPU: 0 PID: 26 at block/blk-settings.c:202 .blk_validate_limits+0x2f8/0x35c
CPU: 0 PID: 26 Comm: kworker/u4:1 Not tainted 6.10.0-rc1 #1
Hardware name: PowerMac7,2 PPC970 0x390202 PowerMac
...
NIP .blk_validate_limits+0x2f8/0x35c
LR .blk_alloc_queue+0xc0/0x2f8
Call Trace:
.blk_alloc_queue+0xc0/0x2f8
.blk_mq_alloc_queue+0x60/0xf8
.scsi_alloc_sdev+0x208/0x3c0
.scsi_probe_and_add_lun+0x314/0x52c
.__scsi_add_device+0x170/0x1a4
.ata_scsi_scan_host+0x2bc/0x3e4
.async_port_probe+0x6c/0xa0
.async_run_entry_fn+0x60/0x1bc
.process_one_work+0x228/0x510
.worker_thread+0x360/0x530
.kthread+0x134/0x13c
.start_kernel_thread+0x10/0x14
...
scsi_alloc_sdev: Allocation failure during SCSI scanning, some SCSI devices might not be configured
Although the hardware can't cope with a 64K segment, the driver
already deals with that internally by splitting large requests in
pata_macio_qc_prep(). That is how the driver has managed to function
until now on 64K kernels.
So fix the driver to advertise a max_segment_size of 64K, which avoids
the warning and keeps the SCSI core happy.
Fixes:
|
||
|---|---|---|
| .. | ||
| pata_parport | ||
| Kconfig | ||
| Makefile | ||
| acard-ahci.c | ||
| ahci.c | ||
| ahci.h | ||
| ahci_brcm.c | ||
| ahci_ceva.c | ||
| ahci_da850.c | ||
| ahci_dm816.c | ||
| ahci_dwc.c | ||
| ahci_imx.c | ||
| ahci_mtk.c | ||
| ahci_mvebu.c | ||
| ahci_octeon.c | ||
| ahci_platform.c | ||
| ahci_qoriq.c | ||
| ahci_seattle.c | ||
| ahci_st.c | ||
| ahci_sunxi.c | ||
| ahci_tegra.c | ||
| ahci_xgene.c | ||
| ata_generic.c | ||
| ata_piix.c | ||
| libahci.c | ||
| libahci_platform.c | ||
| libata-acpi.c | ||
| libata-core.c | ||
| libata-eh.c | ||
| libata-pata-timings.c | ||
| libata-pmp.c | ||
| libata-sata.c | ||
| libata-scsi.c | ||
| libata-sff.c | ||
| libata-trace.c | ||
| libata-transport.c | ||
| libata-transport.h | ||
| libata-zpodd.c | ||
| libata.h | ||
| pata_acpi.c | ||
| pata_ali.c | ||
| pata_amd.c | ||
| pata_arasan_cf.c | ||
| pata_artop.c | ||
| pata_atiixp.c | ||
| pata_atp867x.c | ||
| pata_buddha.c | ||
| pata_cmd64x.c | ||
| pata_cmd640.c | ||
| pata_cs5520.c | ||
| pata_cs5530.c | ||
| pata_cs5535.c | ||
| pata_cs5536.c | ||
| pata_cypress.c | ||
| pata_efar.c | ||
| pata_ep93xx.c | ||
| pata_falcon.c | ||
| pata_ftide010.c | ||
| pata_gayle.c | ||
| pata_hpt3x2n.c | ||
| pata_hpt3x3.c | ||
| pata_hpt37x.c | ||
| pata_hpt366.c | ||
| pata_icside.c | ||
| pata_imx.c | ||
| pata_isapnp.c | ||
| pata_it821x.c | ||
| pata_it8213.c | ||
| pata_ixp4xx_cf.c | ||
| pata_jmicron.c | ||
| pata_legacy.c | ||
| pata_macio.c | ||
| pata_marvell.c | ||
| pata_mpc52xx.c | ||
| pata_mpiix.c | ||
| pata_netcell.c | ||
| pata_ninja32.c | ||
| pata_ns87410.c | ||
| pata_ns87415.c | ||
| pata_octeon_cf.c | ||
| pata_of_platform.c | ||
| pata_oldpiix.c | ||
| pata_opti.c | ||
| pata_optidma.c | ||
| pata_pcmcia.c | ||
| pata_pdc202xx_old.c | ||
| pata_pdc2027x.c | ||
| pata_piccolo.c | ||
| pata_platform.c | ||
| pata_pxa.c | ||
| pata_radisys.c | ||
| pata_rb532_cf.c | ||
| pata_rdc.c | ||
| pata_rz1000.c | ||
| pata_sc1200.c | ||
| pata_sch.c | ||
| pata_serverworks.c | ||
| pata_sil680.c | ||
| pata_sis.c | ||
| pata_sl82c105.c | ||
| pata_triflex.c | ||
| pata_via.c | ||
| pdc_adma.c | ||
| sata_dwc_460ex.c | ||
| sata_fsl.c | ||
| sata_gemini.c | ||
| sata_gemini.h | ||
| sata_highbank.c | ||
| sata_inic162x.c | ||
| sata_mv.c | ||
| sata_nv.c | ||
| sata_promise.c | ||
| sata_promise.h | ||
| sata_qstor.c | ||
| sata_rcar.c | ||
| sata_sil.c | ||
| sata_sil24.c | ||
| sata_sis.c | ||
| sata_svw.c | ||
| sata_sx4.c | ||
| sata_uli.c | ||
| sata_via.c | ||
| sata_vsc.c | ||
| sis.h | ||