linux-hardened/drivers/ata
Yinghai Lu 8f71efe25f sata_mv: fix loop with last port
commit f351b2d638
        sata_mv: Support SoC controllers

cause panic:

scsi 4:0:0:0: Direct-Access     ATA      HITACHI HDS7225S V44O PQ: 0 ANSI: 5
sd 4:0:0:0: [sde] 488390625 512-byte hardware sectors (250056 MB)
sd 4:0:0:0: [sde] Write Protect is off
sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 4:0:0:0: [sde] 488390625 512-byte hardware sectors (250056 MB)
sd 4:0:0:0: [sde] Write Protect is off
sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sde:<1>BUG: unable to handle kernel NULL pointer dereference at 000000000000001a
IP: [<ffffffff806262c7>] mv_interrupt+0x21c/0x4cc
PGD 0
Oops: 0000 [1] SMP
CPU 3
Modules linked in:
Pid: 0, comm: swapper Not tainted 2.6.24-smp-08636-g0afc2ed-dirty #26
RIP: 0010:[<ffffffff806262c7>]  [<ffffffff806262c7>] mv_interrupt+0x21c/0x4cc
RSP: 0000:ffff8102050bbec8  EFLAGS: 00010297
RAX: 0000000000000008 RBX: 0000000000000000 RCX: 0000000000000003
RDX: 0000000000008000 RSI: 0000000000000286 RDI: ffff8102035180e0
RBP: 0000000000000001 R08: 0000000000000003 R09: ffff8102036613e0
R10: 0000000000000002 R11: ffffffff8061474c R12: ffff8102035bf828
R13: 0000000000000008 R14: ffff81020348ece8 R15: ffffc20002cb2000
FS:  0000000000000000(0000) GS:ffff810405025700(0000) knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 000000000000001a CR3: 0000000000201000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 0, threadinfo ffff810405094000, task ffff8102050b28c0)
Stack:  000000010000000c 0002040000220400 0000001100000002 ffff81020348eda8
 0000000000000001 ffff8102035f2cc0 0000000000000000 0000000000000000
 0000000000000018 0000000000000000 0000000000000000 ffffffff80269ee8
Call Trace:
 <IRQ>  [<ffffffff80269ee8>] ? handle_IRQ_event+0x25/0x53
 [<ffffffff8026b393>] ? handle_fasteoi_irq+0x90/0xc8
 [<ffffffff802218e2>] ? do_IRQ+0xf1/0x15f
 [<ffffffff8021df24>] ? default_idle+0x0/0x55
 [<ffffffff8021f361>] ? ret_from_intr+0x0/0xa
 <EOI>  [<ffffffff8023010c>] ? lapic_next_event+0x0/0xa
 [<ffffffff8021df55>] ? default_idle+0x31/0x55
 [<ffffffff8021df50>] ? default_idle+0x2c/0x55
 [<ffffffff8021df24>] ? default_idle+0x0/0x55
 [<ffffffff8021e00b>] ? cpu_idle+0x92/0xb8

Code: 41 14 85 c0 89 44 24 14 0f 84 9d 02 00 00 f7 d0 01 d6 41 89 d5 89 41 14 8b 41 14 89 34 24 e9 7e 02 00 00 49 63 c5 49 8b 5c c6 48 <f6> 43 1a 80 4c 8b a3 20 37 00 00 0f 85 62 02 00 00 31 c9 41 83
RIP  [<ffffffff806262c7>] mv_interrupt+0x21c/0x4cc
 RSP <ffff8102050bbec8>
CR2: 000000000000001a
---[ end trace 2583b5f7a5350584 ]---
Kernel panic - not syncing: Aiee, killing interrupt handler!

last_port already include port0 base.
this patch change use last_port directly, and move pp assignment later.

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11 14:30:01 -05:00
..
ahci.c ahci: fix CAP.NP and PI handling 2008-02-06 06:59:27 -05:00
ata_generic.c ata_generic: Cenatek support 2008-01-23 05:24:17 -05:00
ata_piix.c ata_piix.c:piix_init_one() must be __devinit 2008-02-06 07:01:56 -05:00
Kconfig sata_mv: Remove PCI dependency 2008-02-01 12:26:37 -05:00
libata-acpi.c libata: reimplement ata_acpi_cbl_80wire() using ata_acpi_gtm_xfermask() 2008-01-23 05:24:12 -05:00
libata-core.c libata: ignore deverr on SETXFER if mode is configured 2008-02-11 14:29:47 -05:00
libata-eh.c libata: fix off-by-one in error categorization 2008-01-23 05:24:17 -05:00
libata-pmp.c libata-pmp: 4726 hates SRST 2008-01-10 16:53:12 -05:00
libata-scsi.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-01-25 17:19:08 -08:00
libata-sff.c libata: factor out ata_pci_activate_sff_host() from ata_pci_one() 2008-01-23 05:24:16 -05:00
libata.h libata: move ata_set_mode() to libata-eh.c 2008-01-23 05:24:10 -05:00
Makefile Merge branch 'linux-2.6' 2008-01-31 11:25:51 +11:00
pata_acpi.c libata: implement ata_timing_cycle2mode() and use it in libata-acpi and pata_acpi 2008-01-23 05:24:12 -05:00
pata_ali.c libata: checkpatch fixes 2008-01-23 05:24:10 -05:00
pata_amd.c pata_amd: update mode selection for NV PATAs 2008-01-23 05:24:12 -05:00
pata_artop.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_at32.c drivers/ata/: Spelling fixes 2008-02-03 17:08:11 +02:00
pata_atiixp.c pata_atiixp: Audit notes on locking 2007-10-12 14:55:42 -04:00
pata_bf54x.c Blackfin pata-bf54x driver: fix compiling bug - no ata_port struct in struct ata_device any more 2008-02-01 12:26:43 -05:00
pata_cmd64x.c pata_cmd64x.c typo fix 2007-10-20 01:02:48 +02:00
pata_cmd640.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_cs5520.c PCI: Remove users of pci_enable_device_bars() 2008-02-01 15:04:27 -08:00
pata_cs5530.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_cs5535.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_cs5536.c pata_cs5536: MWDMA fix 2007-10-19 22:55:03 -04:00
pata_cypress.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_efar.c drivers/ata/: Spelling fixes 2008-02-03 17:08:11 +02:00
pata_hpt3x2n.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_hpt3x3.c libata: implement and use ata_port_desc() to report port configuration 2007-10-12 14:55:37 -04:00
pata_hpt37x.c pata_hpt37x: checkpatch fixes 2008-01-23 05:24:13 -05:00
pata_hpt366.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_icside.c libata: convert to chained sg 2008-01-23 05:24:14 -05:00
pata_isapnp.c pata_isapnp: Polled devices 2007-11-23 19:33:27 -05:00
pata_it821x.c libata/pata_it821x: Improve handling of poorly compatible emulations 2008-01-23 05:24:15 -05:00
pata_it8213.c drivers/ata/: Spelling fixes 2008-02-03 17:08:11 +02:00
pata_ixp4xx_cf.c libata: update ->data_xfer hook for ATAPI 2008-01-23 05:24:14 -05:00
pata_jmicron.c pata_jmicron: fix disabled port handling in jmicron_pre_reset() 2007-11-23 19:23:55 -05:00
pata_legacy.c pata_legacy: Merge winbond support 2008-01-23 05:24:17 -05:00
pata_marvell.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_mpc52xx.c Merge branch 'linux-2.6' 2008-01-31 11:25:51 +11:00
pata_mpiix.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_netcell.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_ninja32.c libata: checkpatch fixes 2008-01-23 05:24:10 -05:00
pata_ns87410.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_ns87415.c pata_ns87415: define SUPERIO_IDE_MAX_RETRIES 2007-10-29 06:21:33 -04:00
pata_of_platform.c Rename: linux/pata_platform.h to linux/ata_platform.h 2008-02-06 06:54:17 -05:00
pata_oldpiix.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_opti.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_optidma.c [libata] fix 'if(' and similar areas that lack whitespace 2007-10-29 06:15:27 -04:00
pata_pcmcia.c pata_pcmcia: convert to new data_xfer prototype 2008-01-23 05:24:15 -05:00
pata_pdc202xx_old.c libata: rename ATA_PROT_ATAPI_* to ATAPI_PROT_* 2008-01-23 05:24:14 -05:00
pata_pdc2027x.c libata annotations and fixes 2008-01-23 05:24:15 -05:00
pata_platform.c Rename: linux/pata_platform.h to linux/ata_platform.h 2008-02-06 06:54:17 -05:00
pata_qdi.c libata: update ->data_xfer hook for ATAPI 2008-01-23 05:24:14 -05:00
pata_radisys.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_rz1000.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_sc1200.c Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
pata_scc.c libata: update ->data_xfer hook for ATAPI 2008-01-23 05:24:14 -05:00
pata_serverworks.c pata_serverworks: Fix cable types and cosmetics 2008-01-23 05:24:17 -05:00
pata_sil680.c pata_sil680: kill bogus reset code (take 2) 2007-11-23 19:23:55 -05:00
pata_sis.c drivers/ata/: Spelling fixes 2008-02-03 17:08:11 +02:00
pata_sl82c105.c pata_sl82c105: dual channel support 2008-02-01 12:26:40 -05:00
pata_triflex.c libata: Switch most of the remaining SFF drivers to ata_sff_port_start 2007-10-12 14:55:36 -04:00
pata_via.c pata_via: fix SATA cable detection on cx700 2008-02-11 14:29:42 -05:00
pata_winbond.c pata_winbond: error return 2008-01-23 05:24:17 -05:00
pdc_adma.c libata: convert to chained sg 2008-01-23 05:24:14 -05:00
sata_fsl.c libata: kill now unused n_iter and fix sata_fsl 2008-02-06 06:59:32 -05:00
sata_inic162x.c iommu sg merging: sata_inic162x: use pci_set_dma_max_seg_size 2008-02-05 09:44:11 -08:00
sata_mv.c sata_mv: fix loop with last port 2008-02-11 14:30:01 -05:00
sata_nv.c sata_nv: fix ATAPI issues with memory over 4GB (v7) 2008-02-06 07:00:27 -05:00
sata_promise.c libata: convert to chained sg 2008-01-23 05:24:14 -05:00
sata_promise.h libata annotations and fixes 2008-01-23 05:24:15 -05:00
sata_qstor.c libata: convert to chained sg 2008-01-23 05:24:14 -05:00
sata_sil.c libata: implement protocol tests 2008-01-23 05:24:10 -05:00
sata_sil24.c libata: convert to chained sg 2008-01-23 05:24:14 -05:00
sata_sis.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sata_svw.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sata_sx4.c libata annotations and fixes 2008-01-23 05:24:15 -05:00
sata_uli.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sata_via.c sata_via.c: Remove missleading comment. 2008-02-06 07:00:33 -05:00
sata_vsc.c [libata] Address some checkpatch-spotted issues 2007-10-29 06:15:27 -04:00
sis.h libata: PATA-mode fixes for sis_sata 2007-07-02 10:17:42 -04:00