New: Scsi_Host's n_io_port forgot to be initialized?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 40 lines · On Sun, 4 Mar 2007 01:19:32 -0800 [email protected] wrote:
http://bugzilla.kernel.org/show_bug.cgi?id=8122
Summary: Scsi_Host's
n_io_portforgot to be initialized?
Kernel Version: Linux 2.6.20
Status: NEW
Severity: normal
Owner: [email protected]
Submitter: [email protected]Most recent kernel where this bug did *NOT* occur: No
Distribution: Linux-2.6.20
Problem Description:
It seems that usually structure Scsi_Host'sio_portfield andn_io_portfield needs to be set together.
However, in filedrivers/scsi/dmx3191d.c,
functiondmx3191d_probe_one
71 static int__devinitdmx3191d_probe_one(structpci_dev*pdev,
72 const structpci_device_id*id)
...
88 shost = scsi_host_alloc(&dmx3191d_driver_template,
89sizeof(struct NCR5380_hostdata));
90 if (!shost)
91 gotoout_release_region;
92shost->io_port= io;
93shost->irq=pdev->irq;
...
109 error =scsi_add_host(shost, &pdev->dev);only
io_portis set andn_io_portis uninitialized. Won't this cause some problem? I fear when some code tries to calculate theio_portregion (fromio_portto io_port+n_io_port-1 is regarded as the port region), there would be problem.It seems that in all other similar scsi device's similar functions, like
dc390_probe_oneandinia100_probe_one,io_portandn_io_portare both set. This makes me think above dmx3191d.c's missingn_io_portat least a potential danger.------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
Quoted 5 lines · Andrew Morton
Quoted 5 lines
Most recent kernel where this bug did *NOT* occur: No
Distribution: Linux-2.6.20
Problem Description:
It seems that usually structure Scsi_Host'sio_portfield andn_io_portfield needs to be set together.
io_port and n_io_port are legacy fields left over purely for driver use. The scsi midlayer doesn't care, and if you want to "fix" things in this area please just remove use of it from the offending driver completely so might be able to get rid of these fields one day.