Commit Graph

50548 Commits

Author SHA1 Message Date
Mike Christie 181011e04a [SCSI] tgt: rm bio hacks in scsi tgt
scsi tgt breaks up a command into multple scatterlists
if we cannot fit all the data in one. This was because
the block rq helpers did not support large requests and
because we can get a command of any old size so it is
hard to preallocate pages for scatterlist large enough
(we cannot really preallocate pages with the bio map
user path). In 2.6.20, we added large request support to
the block layer helper, blk_rq_map_user. And at LSF,
we talked about increasing SCSI_MAX_PHYS_SEGMENTS for
scsi tgt if we want to support really really :) large
(greater than 256 * PAGE_SIZE in the worst mapping case)
requests.

The only target currently implemented does not even support
the multiple scatterlists stuff and only supports smaller
requests, so this patch just coverts scsi tgt to use
blk_rq_map_user.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11 11:31:33 -05:00
Mike Christie 0f238418b6 [SCSI] iscsi_tcp: print useful error message when iscsi crc23c allocation fails
People do not read the README and seem to like to
unselect the crc32c module even though iscsi_tcp selects
it for them. This patch spits a error that tells the user
that they really do need the module. Hopefully, we will
get fewer people asking about this now.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11 11:30:11 -05:00
Mike Christie 8231f0eddb [SCSI] iscsi_tcp: increase max_sectors
For a while now, the block layer has seperated max sectors
and max hw sectors. Software iscsi has no limit so this patch
increases max hw sectors, so we can support large pass through
commands.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11 11:28:49 -05:00
Mike Christie 8eb00539d9 [SCSI] libiscsi: use get_unaligned
Dave Miller meantioned that the data buffer in a past
sense fixup patch was not gauranteed to be aligned
properly for ia64. This patch has libiscsi use get_unalinged
to make sure. There are a couple more places in the
digest handling we may need to do this, but we are in the middle
of fixing that code for big endien systems so just the sense
access is fixed here.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11 11:28:09 -05:00
Mike Christie 41be144422 [SCSI] iscsi transport: use atomic for session_nr allocations
qla4xxx and iscsi_tcp or iser could be creating
sessions at the same time, so make session_nr id
allocation atomic.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11 11:27:28 -05:00
Mike Christie bf32ed33e9 [SCSI] iscsi: rename DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH
This patch renames DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH to avoid
confusion with the drivers default values (DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH
is the iscsi RFC specific default).

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11 11:26:50 -05:00
Mike Christie 05db888a46 [SCSI] libiscsi: clear mtask
Consolidate the mtask clearing code.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11 11:26:05 -05:00
Mike Christie 779ea1207b [SCSI] libiscsi: flush work before freeing connection
It's possible that we call iscsi_xmitworker after iscsi_conn_release
which causes a oops. This patch flushes the workqueue.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11 11:24:12 -05:00
Martin K. Petersen 62d42a6277 [SCSI] constants.c: Update ASC list and make it const
Add missing additional sense code and provide pointer to upstream
reference (from Doug Gilbert).

Add missing const (from Michael Tokarev).

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11 11:21:25 -05:00
Martin K. Petersen fa0d34be06 [SCSI] sd: convert logging to new printk helpers
Convert the sd.c SCSI logging calls to scmd_printk()/sd_printk()
instead of plain printk().

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11 11:20:55 -05:00
Martin K. Petersen e73aec8247 [SCSI] sd: make printing use a common prefix
Make SCSI disk printing more consistent:

 - Define sd_printk(), sd_print_sense_hdr() and sd_print_result()

 - Move relevant header bits into sd.h

 - Remove all the legacy disk_name passing and use scsi_disk pointers
   where possible

 - Switch printk() lines to the new sd_ functions so that output is
   consistent

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11 11:20:17 -05:00
Martin K. Petersen a4d04a4cd9 [SCSI] Make error printing more verbose
This patch enhances SCSI error printing by:

 - Making use of scsi_print_result() in the completion functions.

 - Having scmd_printk() output the disk name (when applicable).

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11 11:17:49 -05:00
Martin K. Petersen 684b7fe976 [SCSI] constants.c: cleanup, verbose result printing
Clean up constants.c and make result printing more user friendly:

 - Refactor the command and sense functions so that the actual
   formatting can be called from the various helper functions with the
   correct prefix.

 - Replace scsi_print_hostbyte() and scsi_print_driverbyte() with
   scsi_print_result() which is verbose when CONFIG_SCSI_CONSTANTS is
   on.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11 11:14:02 -05:00
Heiko Carstens 862794fa3f [SCSI] zfcp: fix likely/unlikely usage
zfcp_fsf_protstatus_eval() takes always the 'wrong' branch.

Likely Profiling Results
 ---------------------------------------------------------
[+- ] Type | # True | # False | Function:Filename@Line
+unlikely  |   11042|        0  zfcp_fsf_protstatus_eval()

Acked-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11 11:12:36 -05:00
Linus Torvalds be521466fe Revert "USB: pxa2xx_udc: fix hardcoded irq number"
This reverts commit d2487cb425.

Russell King points out that it's obviously bogus, and I have to agree.
Not only does "irq" not even exist in that scope, but we obviously need
to free the irq that we actually requested, and that's IRQ_USB.

Reported-by: Russell King <rmk@arm.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg KH <greg@kroah.com>
Cc: David Brownell <david-b@pacbell.net>,
Cc: Milan Svoboda <msvoboda@ra.rockwell.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-10 14:22:07 -08:00
Linus Torvalds f47273e5c8 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [IPV6] fix ipv6_getsockopt_sticky copy_to_user leak
  [IPV6]: Fix for ipv6_setsockopt NULL dereference
  [DCCP]: Initialise write_xmit_timer also on passive sockets
  [IPV4]: Fix rtm_to_ifaddr() error handling.
2007-03-09 22:04:27 -08:00
Linus Torvalds f4cd87aabb Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] refresh config files
  [IA64] put kdump_find_rsvd_region in __init
  [IA64] Remove sparse warning from unwind code
  [IA64] add missing syscall trace clear
  [IA64] Cleanup in crash.c
  [IA64] kexec: declare ia64_mca_pal_base in mca.h rather than kexec.h
  [IA64] pci_get_legacy_ide_irq should return irq (not GSI)
  [IA64] whitespace fixes for include/asm-ia64/sal.h
  [IA64] Cache error recovery
  [IA64] Proper handling of TLB errors from duplicate itr.d dropins
2007-03-09 22:00:51 -08:00
Linus Torvalds 271368b69b Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  kobject: new_device->kref wasn't putted after error in kobject_move()
  driver core: export device_rename
  Remove devfs from MAINTAINERS
  Driver core: add device symlink back to sysfs
  Revert "driver core: refcounting fix"
2007-03-09 21:58:28 -08:00
Linus Torvalds 117430b1fa Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
  pci: fix section mismatch warning
  PCI: aer: fix section mismatch warning
  pcie: fix section mismatch warning
  PCI: allow multiple calls to pcim_pin_device()
2007-03-09 21:58:10 -08:00
Linus Torvalds 2695cf412f Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (23 commits)
  USB Elan FTDI: check for workqueue creation
  USB: fix spinlock recursion in cdc-acm.c
  USB: fix Unaligned access in EHCI driver
  USB: Product ID for FT232RL in ftdi_sio
  USBNET: DM9501: Add Corega FEther USB-TXC support.
  USB: ipaq.c: Additional devices
  USB: further fix for usb-serial
  USB: fix usb-serial device naming bug
  USB: RTS/DTR signal patch for airprime driver
  USB: ftdi_sio: use port_probe / port_remove thereby fixing access to the latency_timer
  usb-serial: fix shutdown / device_unregister order
  USB: add Additional PIDs in ftdi_sio
  USB: add QL355P power supply ids to fdti_sio
  USB: New device IDs for cp2101 driver
  USB: kill dead code from hub.c
  USB: ratelimit debounce error messages
  USB: pxa2xx_udc: fix hardcoded irq number
  UHCI: fix port resume problem
  USB: set the correct interval for interrupt URBs
  USB: goku_udc: Remove crude cache coherency code
  ...
2007-03-09 21:57:46 -08:00
Len Brown 63e34ca93a Pull misc-for-upstream into release branch 2007-03-09 23:19:50 -05:00
Len Brown 51e7fff1c2 Pull bugzilla-8110 into release branch 2007-03-09 23:19:25 -05:00
Len Brown bdf3aaf951 Pull bugzilla-8066 into release branch 2007-03-09 23:19:19 -05:00
Len Brown b2526300ab Pull bugzilla-7907 into release branch 2007-03-09 23:18:53 -05:00
Len Brown cb2ebc59ff Pull bugzilla-7570 into release branch 2007-03-09 23:18:46 -05:00
Len Brown 3dfb737998 Pull bugzilla-6859 into release branch 2007-03-09 23:18:35 -05:00
Len Brown 63be2d9305 Pull bugzilla-6316 into release branch 2007-03-09 23:18:22 -05:00
Len Brown 653351b0b9 Pull bugzilla-5966 into release branch 2007-03-09 23:18:05 -05:00
Len Brown 5cb69bcace Pull ibm into release branch 2007-03-09 23:17:46 -05:00
Len Brown c207908fcc Pull altix into release branch 2007-03-09 23:17:39 -05:00
Alexey Starikovskiy 9e19721960 ACPI: ec: fix race in status register access
Delay the read of the EC status register until
after the event that caused it occurs -- otherwise
it is possible to read and act on stale status that was
associated with the previous event.

Do this with a perpetually incrementing "event_count" to detect
when a new event occurs and it is safe to read status.

There is no workaround for polling mode -- it is inherently
exposed to reading and acting on stale status, since it
doesn't have an interrupt to tell it the event completed.

http://bugzilla.kernel.org/show_bug.cgi?id=8110

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-09 23:16:23 -05:00
Cyrill Gorcunov ee17b28973 USB Elan FTDI: check for workqueue creation
Avoid NULL pointer usage if workqueue creation failed.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:25 -08:00
Oliver Neukum 834dbca5b6 USB: fix spinlock recursion in cdc-acm.c
this fixes the spinlock recursion issue. The older fix was incomplete.


Signed-off-by: Oliver Neukum <oneukum@suse.de>
Acked-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:25 -08:00
Max Dmitrichenko 6454365260 USB: fix Unaligned access in EHCI driver
I get following warnings on spar64:
Kernel unaligned access at TPC[1000c9e4] ehci_hub_control+0x54c/0x68c [ehci_hcd]

Despite of the comment in the patched code, the type cast used there
does make unaligned access. The fix was made as it's done in
ohci-hub.c.

Signed-off-by: Max Dmitrichenko <dmitrmax@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:25 -08:00
Gard Spreemann d8b2160683 USB: Product ID for FT232RL in ftdi_sio
Here is a patch adding the PID for the FT232RL to ftdi_sio. The patch
generates a warning during compilation because get_ftdi_divisor doesn't
explicitly handle the FT232RL with this patch, so I guess you don't want
to use it in its current state. It is all I could come up with with the
knowledge I have of the drivers at the moment, though, and I hope you
can have some use for it at least. It works fine with my DLP-TILT with
an FT232RL.

From: Gard Spreemann <spreeman@stud.ntnu.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:25 -08:00
YOSHIFUJI Hideaki 6438ac2677 USBNET: DM9501: Add Corega FEther USB-TXC support.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:25 -08:00
Andre Spahlinger 62d909ced0 USB: ipaq.c: Additional devices
Additional devices

Signed-off-by: Andre Spahlinger <uenz@gmx.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:25 -08:00
Oliver Neukum a1f721c812 USB: further fix for usb-serial
this is a fix for the outstanding usb-serial issues.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:24 -08:00
Oliver Neukum c744f99eb6 USB: fix usb-serial device naming bug
Am Montag, 26. Februar 2007 15:16 schrieb Craig Schlenter:
> Hi Greg
> 
> 34ef50e5b1 is definitely
> the source of the problem. Reverting that makes the
> ftdi port show up as ttyUSB0 again for me and it
> can actually be opened.

This patch should fix the issue.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Craig Schlenter <craig@codefountain.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:24 -08:00
Martin Schiller cf0cb1ae02 USB: RTS/DTR signal patch for airprime driver
I encountered some problems with the airprime driver in use with a Novatel
Merlin XU870:

Closing an open Connection to e.g. /dev/ttyUSB0 doesn't reset the
RTS/DTR lines of the Modem.  Consequently, when I use minicom to
establish a connection by "ATD*99#" the modem doesn't hang up even if i
exit minicom and so I cannot reuse the modem unless I remove it and plug
it in again.

With the attached patch, the RTS/DTR lines are resetted on a close.  The
code was mainly taken from the option.c driver.
2007-03-09 19:52:24 -08:00
Jim Radford 12bdbe03c8 USB: ftdi_sio: use port_probe / port_remove thereby fixing access to the latency_timer
Convert all the port specific code in attach / shutdown to use the new
port_probe / port_register callbacks from device_register /
device_unregister allowing adding the sysfs attributes to be added at
the correct time and to the serial port device itself, instead of to
the unadorned usb device, avoiding a NULL dereference.

Signed-off-by: Jim Radford <radford@blackbean.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:24 -08:00
Jim Radford d9a7ecacac usb-serial: fix shutdown / device_unregister order
Ensure that the ->port_remove() callbacks get called before the
->shutdown() callback which makeing the order symmetric with
->attach() being called before ->port_probe().

Signed-off-by: Jim Radford <radford@blackbean.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:24 -08:00
Thomas Schleusener 4eaf60e011 USB: add Additional PIDs in ftdi_sio
I've developed some devices with FTDI chips (FT232xx). FTDI was so kind
to give some own PID's which I can use together with their VID. Some of
the devices are already very popular here and I have customers from
universities, institutes .....

I use the FTDI VID 0x0403. My PID's are:

0xff38 - IBS US485 (USB<-->RS422/485 interface)
0xff39 - IBS PIC-Programmer
0xff3a - IBS Card reader for PCMCIA SRAM-cards
0xff3b - IBS PK1 - Particel counter
0xff3c - IBS RS232 - Monitor
0xff3d - APP 70 (dust monitoring system)
0xff3e - IBS PEDO-Modem (RF modem 868.35 MHz)
0xff3f - future device

The company is "IBS Ing.-Buero Schleusener".


From: Thomas Schleusener <thomas@be-schl.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:24 -08:00
Michael Olberg ef31fec01a USB: add QL355P power supply ids to fdti_sio 2007-03-09 19:52:24 -08:00
Jon K Hellan fc4bd64cbb USB: New device IDs for cp2101 driver
Here are two new device IDs for the cp2101 driver.
The diff is with linus's tree as of this evending.

From: Jon K Hellan <hellan@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:24 -08:00
Oliver Neukum 5bb16d189f USB: kill dead code from hub.c
this kills residual obsoletet code from hub.c

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:24 -08:00
Oliver Neukum 7bc4b81ded USB: ratelimit debounce error messages
flaky hardware can cause a lot of debounce failed messages. To limit
the performance impact, a ratelimit should be used.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:23 -08:00
Milan Svoboda d2487cb425 USB: pxa2xx_udc: fix hardcoded irq number
This patch changes last use of hardcoded number of irq to
use platfrom_get_irq.

Signed-off-by: Milan Svoboda <msvoboda@ra.rockwell.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:23 -08:00
Alan Stern 88018158d1 UHCI: fix port resume problem
This patch (as863) fixes a problem encountered sometimes when resuming
a port on a UHCI controller.  The hardware may turn off the
Resume-Detect bit before turning off the Suspend bit, leading usbcore
to think that the port is still suspended and the resume has failed.
The patch makes uhci_finish_suspend() wait until both bits are safely
off.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:23 -08:00
Alan Stern 97b9eb91dc USB: set the correct interval for interrupt URBs
This patch (as862) fixes a couple of bugs in the way usbcore handles
intervals for interrupt URBs.  usb_interrupt_msg (and usb_bulk_msg for
backward compatibility) don't set the interval correctly for
high-speed devices.  proc_do_submiturb() doesn't set it correctly when
a bulk URB is submitted to an interrupt endpoint.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:23 -08:00