10 Apr, 2013
2 commits
-
asc_prt_line() had been hiding several places where formats had not
matched the argument types. The previous commit has finally made them
visible...Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
04 Jan, 2013
1 commit
-
CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.Cc: Bill Pemberton
Cc: Adam Radford
Cc: "James E.J. Bottomley"
Signed-off-by: Greg Kroah-Hartman
29 Mar, 2012
1 commit
-
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it. Performed with the following command:perl -p -i -e 's!^#\s*include\s*.*\n!!' `grep -Irl '^#\s*include\s*' *`
Signed-off-by: David Howells
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
17 Nov, 2010
1 commit
-
Move the mid-layer's ->queuecommand() invocation from being locked
with the host lock to being unlocked to facilitate speeding up the
critical path for drivers who don't need this lock taken anyway.The patch below presents a simple SCSI host lock push-down as an
equivalent transformation. No locking or other behavior should change
with this patch. All existing bugs and locking orders are preserved.Additionally, add one parameter to queuecommand,
struct Scsi_Host *
and remove one parameter from queuecommand,
void (*done)(struct scsi_cmnd *)Scsi_Host* is a convenient pointer that most host drivers need anyway,
and 'done' is redundant to struct scsi_cmnd->scsi_done.Minimal code disturbance was attempted with this change. Most drivers
needed only two one-line modifications for their host lock push-down.Signed-off-by: Jeff Garzik
Acked-by: James Bottomley
Signed-off-by: Linus Torvalds
17 Jun, 2010
1 commit
-
Signed-off-by: Uwe Kleine-König
Signed-off-by: Jiri Kosina
01 May, 2010
1 commit
-
Error handling on advansys_board_found is fixed, because it's buggy in
the case we have an ASC_NARROW_BOARD set and failure happens on
AscInitAsc1000Driver step: it was freeing items of wrong struct in the
dvc_var union of struct asc_board, which could lead to an oops in the
case we set some of the fields in struct of narrow board as code was
choosing to always freeing wide board fields, and not everything was
being freed/released properly.Signed-off-by: Herton Ronaldo Krzesinski
Signed-off-by: James Bottomley
28 Mar, 2010
1 commit
-
On newer kernels users of advansys module are reporting system hang when
trying to load it without firmware files present. After looking closely
at description on https://qa.mandriva.com/show_bug.cgi?id=53220, I think
this is related to commit "[SCSI] advansys: use request_firmware". The
problem is that after switch to request_firmware, asc_dvc->err_code
isn't being set when firmware files aren't found or loading fails.err_code is used by the driver to judge if there was a fatal error or
not, as can be seen for example on advansys_board_found, which will only
return -ENODEV when err_code is set. Because err_code isn't being set
when request_firmware fails, this is a change of behaviour of the code
before request_firmware addition, making it continue to load and it
fails later as the firmware wasn't really loaded.Signed-off-by: Herton Ronaldo Krzesinski
Signed-off-by: James Bottomley
05 Dec, 2009
1 commit
-
"Definition" is misspelled "defintion" in several comments; this
patch fixes them. No code changes.Signed-off-by: Adam Buchbinder
Signed-off-by: Jiri Kosina
03 Apr, 2009
1 commit
-
Firmware blob looks like this...
__le32 checksum
unsigned char data[]Signed-off-by: Jaswinder Singh Rajput
Signed-off-by: James Bottomley
03 Jan, 2009
1 commit
-
[jejb: limit ioctl to returning 20 characters to avoid overrun
on long device names and add a few more conversions]
Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: James Bottomley
30 Dec, 2008
1 commit
-
Use the newly introduced pci_ioremap_bar() function in drivers/scsi.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.Signed-off-by: Arjan van de Ven
Acked-by: Matthew Wilcox
Cc: Brian King
Cc: Ed Lin
Cc: Nick Cheng
Signed-off-by: James Bottomley
01 Dec, 2008
1 commit
-
The code
if (shost->dma_channel != NO_ISA_DMA)
free_dma(shost->dma_channel);in there is triggerable only if we have CONFIG_ISA (we only set ->dma_channel to
something other than NO_ISA_DMA under #ifdef CONFIG_ISA). OTOH, free_dma() is
not guaranteed to be there in absense of CONFIG_ISA. IOW, driver runs into
undefined symbols on PCI-but-not-ISA configs (e.g. on frv) and it's a false
positive.Fix: put the entire if () under #ifdef CONFIG_ISA; behaviour doesn't change and
dependency on free_dma() disappears for !CONFIG_ISA.Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds
27 Jul, 2008
1 commit
-
[jejb: fixed up a ton of missed conversions.
All of you are on notice this has happened, driver trees will now
need to be rebased]Signed-off-by: Harvey Harrison
Cc: SCSI List
Signed-off-by: Andrew Morton
Signed-off-by: James Bottomley
08 Mar, 2008
1 commit
-
buf[i] can be up to 0xfd, so doubling it and assigning the result to an
unsigned char truncates the value. Just use an unsigned int instead;
it's only a temporary.Signed-off-by: Matthew Wilcox
Cc: Stable Tree
Signed-off-by: James Bottomley
12 Feb, 2008
1 commit
-
struct asc_dvc_var needs overrun buffer to be placed on an 8 byte
boundary. advansys defines struct asc_dvc_var:struct asc_dvc_var {
...
uchar overrun_buf[ASC_OVERRUN_BSIZE] __aligned(8);The problem is that struct asc_dvc_var is placed on
shost->hostdata. So if the hostdata is not on an 8 byte boundary, the
advansys crashes. The hostdata is placed on a sizeof(unsigned long)
boundary so the 8 byte boundary is not garanteed with x86_32.With 2.6.23 and 2.6.24, the hostdata is on an 8 byte boundary by
chance, but with the current git, it's not.This patch removes overrun_buf static array and use kzalloc.
Signed-off-by: FUJITA Tomonori
Signed-off-by: James Bottomley
08 Feb, 2008
1 commit
-
Signed-off-by: Adrian Bunk
Signed-off-by: Andrew Morton
Signed-off-by: James Bottomley
26 Jan, 2008
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (200 commits)
[SCSI] usbstorage: use last_sector_bug flag universally
[SCSI] libsas: abstract STP task status into a function
[SCSI] ultrastor: clean up inline asm warnings
[SCSI] aic7xxx: fix firmware build
[SCSI] aacraid: fib context lock for management ioctls
[SCSI] ch: remove forward declarations
[SCSI] ch: fix device minor number management bug
[SCSI] ch: handle class_device_create failure properly
[SCSI] NCR5380: fix section mismatch
[SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devices
[SCSI] IB/iSER: add logical unit reset support
[SCSI] don't use __GFP_DMA for sense buffers if not required
[SCSI] use dynamically allocated sense buffer
[SCSI] scsi.h: add macro for enclosure bit of inquiry data
[SCSI] sd: add fix for devices with last sector access problems
[SCSI] fix pcmcia compile problem
[SCSI] aacraid: add Voodoo Lite class of cards.
[SCSI] aacraid: add new driver features flags
[SCSI] qla2xxx: Update version number to 8.02.00-k7.
[SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command.
...
24 Jan, 2008
1 commit
-
This replaces sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE in
several LLDs. It's a preparation for the future changes to remove
sense_buffer array in scsi_cmnd structure.Signed-off-by: FUJITA Tomonori
Signed-off-by: James Bottomley
15 Jan, 2008
1 commit
-
Fix section mismatch warning:
WARNING: vmlinux.o(.exit.text+0x152a): Section mismatch: reference to .init.data:_asc_def_iop_base (between 'advansys_isa_remove' and 'advansys_exit')
Signed-off-by: Randy Dunlap
Cc: Matthew Wilcox
Cc: James Bottomley
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Oct, 2007
19 commits
-
Change PortAddr to be an unsigned int instead of an unsigned short (IO
Port address are 24 bit on parisc). Fix a couple of printk argument
warnings. Remove the Kconfig marking as 'BROKEN'.I haven't removed the #warning yet because virt_to_bus/bus_to_virt are
only eliminated for narrow boards. Wide boards need more work.Signed-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
Convert the call to virt_to_bus() into a call to dma_map_single(). Some
architectures may require different DMA addresses for different devices,
so allocate one overrun buffer per host rather than one for all cards.Signed-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
Replace ASC_VADDR_TO_U32 and ASC_U32_TO_VADDR with an auto-expanding
array that maps pointers to 32-bit IDs and back. One of the uses of
ASC_VADDR_TO_U32 was in error; it should have been using ADV_VADDR_TO_U32.Also replace the use of virt_to_bus when setting the sense_address with
a call to dma_map_single() followed by dma_cache_sync. This part cribbed
from the 53c700 driver.Signed-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
- remove the unnecessary map_single path.
- convert to use the new accessors for the sg lists and the parameters.Signed-off-by: FUJITA Tomonori
- convert the statistics to not distinguish between single and sg xfers
- replace ASC_CEILING with DIV_ROUND_UP
- remove an obsolete commentSigned-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
This rather complex function boiled down to calling virt_to_bus().
Also get rid of some obsolete defines and variables that could never vary.Signed-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
board->carrp is a duplicate of asc_dvc->carrier_buf, so cut out the
middle-man and assign directly to carrier_buf. Move orig_reqp to adv_dvc
too, since it's wide-board specific. Also eliminate an unnecessary BUG_ON
(we'll never get there with a NULL carrier_buf, and will crash if we do).
The bulk of this patch is rearranging structures so everything's declared
in the right order.Signed-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
It's somewhat neater to make this a pointer to one of two tables
than initialising an array in the driver. Also delete the unused
AscSynIndexToPeriod and rename host_init_sdtr_index to min_sdtr_indexSigned-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
It's always a mistake to have your own index of boards; just use the
scsi host number.Signed-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
The board lock was essentially identical with the host lock.
Signed-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
Replace ASC_DBG{,1,2,3,4,5} with a single variadic macro ASC_DBG. As
suggested by Jeff Garzik, include DRV_NAME and __FUNCTION__ in the output.
Change all callers to no longer include the function name in the string.Enabling ADVANSYS_DEBUG to test this feature shows a lot of other problems
that need to be fixed:
- Reorder asc_prt_* functions now that their prototypes have been removed.
- There is no longer a struct device in ASC_DVC_CFG/ADV_DVC_CFG, and it
wasn't necessarily a PCI device to begin with. Print the bus_id from
asc_board->dev instead.
- isr_callback no longer exists.
- ASC_DBG_PRT_SCSI_CMND isn't being used, so delete asc_prt_scsi_cmnd
too.
- A missing semicolonSigned-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
With the ASC and ADV libraries merged into the driver, there really is
no point in reporting their version numbers, or even trying to maintain
them.Signed-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
asc_board_t was simply a typedef for struct asc_board. ASC_BOARDP()
can be replaced by shost_priv() except in the ASC_STATS* macros which
rely on the cast; add an explicit cast there.Signed-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
There were two blocks of ASC_IERR definitions; one for narrow and one for
wide boards. Some of the same names were used (with the same values),
and some of the same values were used with different names. This could
only lead to confusion, so I unified them in one block of definitions
with no overlapping values.Signed-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
The interrupt number was being stored in 4-5 different places, each with
its own type, rules and usage. Fix this by keeping an unsigned int in
the struct asc_board, and filling it in from the bus probe functions
(since it's different for each of the four bus types). In order to do
this, we have to allocate the Scsi_Host in the bus probe functions too.
Then we can return an error from advansys_board_found, which requires
a little rearranging of code (and removing of the err_code variable).
Move the Wide Board flag setting into the PCI bus probe function.Split the AscGetChipIRQ function into three functions (one for each bus
type that needs it) and add some commentary to explain what's going on.
Also get rid of the AscSetChipIRQ function as we only ever set the
interrupt number to the same value it already had.Signed-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
Replace it with !ASC_NARROW_BOARD
Signed-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
It was only ever set; never tested, nor cleared.
Signed-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
- Don't need to set ASC_HOST_IN_RESET any more
- Don't need to test scp->device->host for NULL -- if it's NULL, we
couldn't've been called.
- Use scmd_printk instead of ASC_PRINTSigned-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
The narrow board used two global structures to set up a command;
unfortunately they weren't locked, so with two boards in the machine,
one call to queuecommand could corrupt the data being used by the other
call to queuecommand.Fix this by allocating asc_scsi_q on the stack (64 bytes) and using kmalloc
for the asc_sg_head (2k)Signed-off-by: Matthew Wilcox
Signed-off-by: James Bottomley -
The wide and narrow boards share identical handling of the return value,
except for some trivial error messages. Move the handling to the common
end of the function. Also move variable declarations to the arms of
the `if' that they're used in and delete some pointless comments.Signed-off-by: Matthew Wilcox
Signed-off-by: James Bottomley