It checked for the flags beeing 0, which it always was for a long
time. It looks a bit fishy thus, so if someone wants to audit
srb.flags audit please do so.
Felipe Damasio [Thu, 25 Sep 2003 07:57:54 +0000 (02:57 -0500)]
[PATCH] Memory leak in scsi_debug found by checker
If in the middle of loop a kmalloc failed, that means that the
previous calls succeeded..so they must be also be freed (and removed
from the dev_info_list).
Matthew Wilcox [Thu, 25 Sep 2003 07:46:49 +0000 (02:46 -0500)]
[PATCH] Kill off sym1
- Remove sym1 driver
- Remove PCI stuff from sym53c8xx_comm.h
- Remove PCI stuff from ncr53c8xx.c
- Remove device_t typedef
- Remove u_int32 and u_int64
- Remove first_host and the_template
- Remove SPARC support (get back to me when someone puts a 720 in a Sparc :-P)
[PATCH] Generalize 32bit emulation support in MPT fusion
The mptctl module has had sparc64 32bit emulation support for some
time. This patch generalizes it to use the generic compat infrastructure.
This makes it work on x86-64 too.
I also removed one special case for sparc in the locking that didn't
make any sense to me.
I got underflow warnings and failures when sending an INQUIRY page 0x83
via the SG_IO REQ_BLOCK_PC interface.
The underflow field should only be set if we know for certain the size of
the data being transfered, so fix this by leaving it at zero for scsi
REQ_BLOCK_PC cases.
- move the struct parisc_driver down like in most drivers, avoids
two forward-declarations
- give lasi700_scsi_tbl and lasi700_driver_callback sensible names
- properly return -ENOMEM instead of 1 on kmalloc failure
- check scsi_add_host return value
This patch adds shost_for_each_device(). It's used to abstract out
scsi_host.my_devices traversal. The next step will be to replace
the current simple implementation with one that's fully locked down
an reference counted.
For various reasons (e.g. the .my_devices lockdown) it's undesirable
to have scsi_device_{get,put} blocking. Change .access_count to an
atomic_t to avoid the driver model r/w semaphore.
Sideeffects:
- possible module reference leak in scsi_device_get when get_device
fails fixes.
- the access_count attribute is gone. We already have this exposed
to userspace in too many places given that this whole second
refcount will go away once Al fixes the block layer.
Alan Stern [Thu, 25 Sep 2003 06:16:21 +0000 (01:16 -0500)]
[PATCH] PATCH: (as84) Small fixup for SCSI proc code
The updated SCSI proc directory code that I sent you a few months ago has
a small mistake -- the error path fails to release a semaphore. This
patch fixes it; please apply.
Matthew Wilcox [Fri, 12 Sep 2003 05:54:14 +0000 (01:54 -0400)]
[PATCH] zalon & ncr53c8xx cleanups
I don't actually have a zalon machine to test these on, but they seem
right to me, and compile fine.
Some cleanups for ncr53c8xx & zalon:
- Inline zalon.h into zalon.c
- Rationalise (a little) ncr53c8xx.c's includes
- Remove all the version checks
- Stop using remap_pci_mem & unmap_pci_mem & delete their definitions.
- Use mb() instead of custom inline asm for MEMORY_BARRIER.
Passing the address of a `long' as the `flags' parameter of check_setup_args()
causes a warning. But apparently this parameter isn't used at all, so remove
it.
Matthew Wilcox [Fri, 12 Sep 2003 05:35:36 +0000 (01:35 -0400)]
[PATCH] sym53c8xx 2.1.18b
This patch fixes two bugs in sym 2.1.18.
- 40-bit addressing doesn't fit into 32-bits, so PciDmaMask needs
to be an ULL.
- Add terminating entries to pci_device_id tables. Bug spotted by
Matt Domsch.
Andrew Morton [Fri, 12 Sep 2003 05:23:44 +0000 (01:23 -0400)]
[PATCH] Fix imm.c again
From: Adrian Bunk <bunk@fs.tum.de>
Earlier patch wasn't correct especially in the !CONFIG_SCSI_IZIP_EPP16
case, reading all uses of this array (IMM_MODE_STRING is used to print the
corresponding string in printks).
If I'm not misunderstanding it, CONFIG_SCSI_IZIP_EPP16 means "use 16bit
even when 32bit is requested".
Matthew Wilcox [Mon, 8 Sep 2003 18:25:47 +0000 (13:25 -0500)]
[PATCH] sym53c8xx driver 2.1.18
Yes, there's a lot of changes here. I've been busy :-P
- Delete linux/version.h include as it's not necessary
- Delete compatibility with ncr53c8xx configuration options
- Convert to C99 initialisers
- Delete the options: pci_parity, scsi_parity, min_sync, max_wide,
max_offs, max_lun and pci_fix_up. Some were unused, some are now
unused.
- Delete all the default settings from sym_conf.h that were unused.
- Delete host_lock abstractions.
- Replace custom jiffy handling with standard ones.
- Replace u_long with unsigned long
- Inline scsi_data_direction()
- Use ioremap directly instead of indirecting through pci_map_mem.
- Delete typedefs: bus_addr_t, ucmd_p, vm_offset_t, stcb_p,
slcb_p, sccb_p, shcb_p, sym_device and sym_slot.
- Use min() instead of MIN()
- Use memcpy() instead of bcopy().
- Delete code dependent on SYM_CONF_PCIQ_BROKEN_INTR as it's never defined.
- Simplify the locking in sym_eh_handler().
- Make the eh handlers static.
- Use ctype.h instead of custom variants.
- Use SYM_CONF_IOMAPPED and SYM_OPT_NO_BUS_MEMORY_MAPPING in a more
consistent manner.
- Remove check_region() and use pci_request_region instead.
- Mark sym_detach() as __devexit.
- Move many includes from sym_glue.h to sym_glue.c
- Stop using Scsi_Cmnd.
- Stop using ../hosts.h.
- Simplify *_raw definitions.
- Move PA-RISC specific code into its own function.
Russell King [Mon, 8 Sep 2003 20:28:05 +0000 (21:28 +0100)]
[SERIAL] Make SA11x0 serial driver build.
Update the SA11x0 serial driver for the removal of system devices
from the driver model. The driver becomes a platform device driver.
The driver is now known to the driver model and resource subsytems
as "sa11x0-uart".
Without this, if elv_try_last_merge() returns nonzero, we do not
initialise *req. That results in a subsequent BUG_ON() in
__make_request() because req is NULL (or is just uninitialised).
Arnd's new-and-improved _IOx() argument checking showed two sound
drivers whose microcode load ioctl's used types with sizes that
overflow the ioctl number. Mark them _IOx_BAD() to document the fact.
This new version works with all compiler versions, and also catches the
case where somebody tries to pass in an array as an argument to the
ioctl macros. Thus we verify that only proper types are used.
I have checked now that the object code for arch/s390/kernel/compat_ioctl.o
remains identical and that the whole kernel compiles for s390 and i386,
after fixing the broken ioctl numbers.
Rusty Russell [Sun, 7 Sep 2003 13:46:30 +0000 (06:46 -0700)]
[PATCH] modprobe -q: quieter when modules missing
The kernel invokes "modprobe" on modules which might not exist:
rightfully, modprobe complains by default when this happens. So the
correct response is to invoke "modprobe -q", which is silent on such
errors (but still reports other errors such as config errors).
Also, use MODULE_NAME_LEN from module.h instead of inventing our own.
Rusty Russell [Sun, 7 Sep 2003 13:46:23 +0000 (06:46 -0700)]
[PATCH] Modules: Be stricter recognizing init&exit sesections
Someone pointed out that -ffunction-sections can cause a function called
"init<something>" to be put in the init section, and discarded. This
hurts PARISC badly. Get more fussy with identifying them.
Nothing too exciting, just some minor new features and bug fixes.
The IOMMU code should now not BUG again without CONFIG_IOMMU_DEBUG/iommu=force
- Compiles now with -funit-at-a-time
- Fix up ioctl 32bit tables following Andrew's change.
- Fix __SI_POLL siginfo_t passing to user space
- Add 32bit emulation for fadvise64_64
- Remove unneeded sys32_utimes
- Various merges with i386 (ACPI, APIC etc.)
- Port cpuid patching infrastructure from i386
- Use it to provide better copy_*_user/memcpy/memset/clear/copy_page for
C stepping K8. String instructions are faster now that unrolled loops.
- Don't try to merge unforced PCI mappings that don't exceed the device's
DMA mask.
- Discard .exit.data/.exit.text at runtime like i386
- Don't use NTI stores for clear_user
- Convert bitops.h bitmap functions to use unsigned long * pointers instead
of void *
- Fix some warnings in kernel headers.
- Fix PDA comments
Russell King [Sun, 7 Sep 2003 08:48:13 +0000 (01:48 -0700)]
[PATCH] Fixes to allow ARM to build in the standard tree
In addition to the MODULE_ALIAS_LDISC patch, the following changes to
generic code are needed to allow ARM to build in Linus' tree.
The first is to add PT_SINGLESTEP to ptrace.h so we do the right thing
when adding/removing breakpoint instructions into processes (see
arch/arm/kernel/{signal.c,ptrace.c} for usage.)
The second is needed because pmd_clear() needs to flush the pmd.
However, we can't include tlbflush.h into pgtable.h without causing
a circular dependency (tlbflush.h needs vm_area_struct and mm_struct
which are in mm.h, which needs pgtable.h.) swapfile.c seems to be the
only file affected.
here are the next fixes, sorry for the delay, but one of bugs was a really
odd one.
Note:
- here are lot of bugs left, so ISDN is not stable yet but
I think it's really time to fix it, even if it need some cycles
to get it right (normally I'm only send patches if it works 100% for
me).
- I add some additional #warnings to address places which need fixing
(I hope that some of the other ISDN developer jump in)
Matthew Wilcox [Sun, 7 Sep 2003 02:43:46 +0000 (19:43 -0700)]
[PATCH] use size_t for the broken ioctl numbers
The ioctl number-generating macros should be used like
#define XXXX _IOR(n,x,type-of-arg)
which generates an ioctl number that has the size of the argument
encoded within it. But there are a number of ioctl #defines that look
like
#define XXXX _IOR(n,x,sizeof(type-of-arg))
which is very wrong: the _IO/_IOR/_IOW/_IOWR macros will do the sizeof()
on the argtype themselves, so the end result is that we will be doing a
sizeof(sizeof(argtype)), ie a sizeof(size_t).
In other words, the argtype didn't matter at all, and ended up totally
pointless.
Clearly it's too late to change the ioctl definitions, but we can at
least stop people from copying them and making the same mistake.
Sam Ravnborg [Sat, 6 Sep 2003 23:26:51 +0000 (01:26 +0200)]
kbuild: genksyms, add explicit reference to include dir
genksyms references .h files in the genksyms directory from a
generated .c file. Explicit tell kbuild to search the genksyms
directory in the kernel src tree for .h files.
Sam Ravnborg [Sat, 6 Sep 2003 23:13:18 +0000 (01:13 +0200)]
kbuild/isdn: Defer md5sum calculation until needed
Replacing ':=' assignment with '=' assignment defers md5sum calculation until
required. The pevious implementation actually calculated the md5sum during
a make clean
Sam Ravnborg [Sat, 6 Sep 2003 23:10:51 +0000 (01:10 +0200)]
kbuild/ieee1394: Makefile update
Use full path to script in oui.c build rule.
Take advantage of kbuild checking command-line arguments,
by adding FORCE as prerequisite, and by use of targets=
I looked a bit more at the keyboard code and find a bug
and a probable bug.
(i) In case a synaptics touchpad has been detected, the comment says
"disable AUX". But we do not set the disable bit, but instead .and.
with the bit - no doubt getting zero. This must be a bug.
(ii) Directly above this is the suspicious comment "keyboard translation
seems to be always off". But every machine comes always up in
translated scancode 2. Translation is never off. But wait! by
mistake the above .and. cleared the XLATE bit.
So, I think bug (i) explains mystery (ii).
However, note that this is code reading only. I do not have the
hardware, so cannot test.
Patch to insert ioremap() error checking and missing iounmap()'s. Also
updated error handling to have only one return statement on error.
Finally, in saa7134_finidev() on line 954 there was a duplicate
saa7134_i2c_unregister().
Dmasound core fixes from Christoph Hellwig:
- Some exported symbols are declared __init - in the modular case this is
freed before the other modules can call it..
- dmasound.lock is initialized too late, do it at compile time