]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
13 years agotg3: Return flowctrl config through ethtool
Matt Carlson [Thu, 8 Dec 2011 14:40:17 +0000 (14:40 +0000)]
tg3: Return flowctrl config through ethtool

This patch changes the driver to return the flow control configuration
rather than the flow control status through the ETHTOOL_GPAUSEPARAM
ioctl.

(cherry picked from commit 4a2db503c57f7223d851dc7ab8cefca614e0d98a)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Save stats across chip resets
Matt Carlson [Thu, 8 Dec 2011 14:40:14 +0000 (14:40 +0000)]
tg3: Save stats across chip resets

Tg3 has a place to store stats, but doesn't really use it.  This patch
modifies the driver so that stats are saved across chip resets and gets
cleared across close / open calls.

(cherry picked from commit 92feeabf3f673767c6ee4cfc7fc224098446c1c1)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Remove ethtool stats member from dev struct
Matt Carlson [Thu, 8 Dec 2011 14:40:13 +0000 (14:40 +0000)]
tg3: Remove ethtool stats member from dev struct

This patch removes the ethtool stats member from the tg3 device
structure.

(cherry picked from commit 0e6c9da35ef774109a1b5740144c9d442bd5a5b5)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Scale back code that modifies MRRS
Matt Carlson [Mon, 28 Nov 2011 09:41:04 +0000 (09:41 +0000)]
tg3: Scale back code that modifies MRRS

Tg3 normally gets a performance boost by increasing the PCI Maximum Read
Request Size (MRRS) to 4k.  Unfortunately, this is causing some problems
on particular hardware platforms.  This patch removes all code that
modifies the MRRS except for one case.

As part of a solution to fix an internal FIFO problem on the 5719, the
driver artificially capped the MRRS to 2k for the entire 5719, and later
5720, ASIC revs.  This was overly aggressive and only really needed to
be done for the 5719 A0.  In the spirit of the rest of this patch, the
driver will only reprogram the MRRS for this device if the value exceeds
the 2k cap.

(cherry picked from commit 2c55a3d08ade44a778c182c220a7907ec65d5fb8)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Fix TSO CAP for 5704 devs w / ASF enabled
Matt Carlson [Mon, 28 Nov 2011 09:41:03 +0000 (09:41 +0000)]
tg3: Fix TSO CAP for 5704 devs w / ASF enabled

On the earliest TSO capable devices, TSO was accomplished through
firmware.  The TSO cannot coexist with ASF management firmware though.
The tg3 driver determines whether or not ASF is enabled by calling
tg3_get_eeprom_hw_cfg(), which checks a particular bit of NIC memory.
Commit dabc5c670d3f86d15ee4f42ab38ec5bd2682487d, entitled "tg3: Move
TSO_CAPABLE assignment", accidentally moved the code that determines
TSO capabilities earlier than the call to tg3_get_eeprom_hw_cfg().  As a
consequence, the driver was attempting to determine TSO capabilities
before it had all the data it needed to make the decision.

This patch fixes the problem by revisiting and reevaluating the decision
after tg3_get_eeprom_hw_cfg() is called.

(cherry picked from commit cf9ecf4b631f649a964fa611f1a5e8874f2a76db)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Add MDI-X reporting
Matt Carlson [Mon, 21 Nov 2011 15:01:20 +0000 (15:01 +0000)]
tg3: Add MDI-X reporting

This patch adds MDI-X state reporting.

(cherry picked from commit e348c5e7de4a759a94eed4d0303ba81a4939f8b9)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Restrict large prod ring cap devices
Matt Carlson [Mon, 21 Nov 2011 15:01:19 +0000 (15:01 +0000)]
tg3: Restrict large prod ring cap devices

Future devices may or may not be capable of supporting larger rx
producer rings.  This patch changes the code so that this flag is set on
an ASIC rev to ASIC rev basis.  Also, this patch changes a place where
the LRG_PROD_RING_CAP flag was not controlling how the rx standard
producer ring size was set.

(cherry picked from commit fa6b2aae6ab5ae1ce4b65c1872477c4b794d338e)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Adjust BD replenish thresholds
Matt Carlson [Mon, 21 Nov 2011 15:01:18 +0000 (15:01 +0000)]
tg3: Adjust BD replenish thresholds

The BD replenish thresholds for the 57765 and newer ASIC revs are a
little strict.  They were tuned for a mode that is currently unused.
This patch relaxes the thresholds so that they are set to values more
inline with the resources available.

(cherry picked from commit 513aa6ea39adfc9daf5b4bc33b49008733c3eb51)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Make 1000Base-X FC resolution look like 1000T
Matt Carlson [Mon, 21 Nov 2011 15:01:17 +0000 (15:01 +0000)]
tg3: Make 1000Base-X FC resolution look like 1000T

This patch changes tg3's 1000Base-X flow control resolution to look like
the 1000Base-T flow control resolution code.

(cherry picked from commit f3791cdf33e7d21515de25f5ead0eca38f85ca11)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Update version to 3.121
Matt Carlson [Fri, 4 Nov 2011 09:15:05 +0000 (09:15 +0000)]
tg3: Update version to 3.121

This patch updates the tg3 version to 3.121.

(cherry picked from commit 5ae7fa06bb90421bc63f1f1e56ab241b49bc7b91)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Eliminate timer race with reset_task
Matt Carlson [Fri, 4 Nov 2011 09:15:04 +0000 (09:15 +0000)]
tg3: Eliminate timer race with reset_task

During shutdown, it is impossible to reliably disable the timer and
reset_task threads.  Each thread can schedule the other, which leads to
shutdown code that chases its tail.

To fix the problem, this patch removes the ability of tg3_reset_task to
schedule a new timer thread.  To support this change, tg3_timer no
longer terminates itself, but rather goes into a polling mode.

(cherry picked from commit 5b1906241905d9bd1abe920854b3d43c2b9c85e1)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Schedule at most one tg3_reset_task run
Joe Jin [Tue, 15 May 2012 13:25:17 +0000 (21:25 +0800)]
tg3: Schedule at most one tg3_reset_task run

It is possible for multiple threads in the tg3 driver to each attempt to
schedule a run of tg3_reset_task().  The multiple tg3_reset_task
executions could all wind up on the same queue (and execute serially) or
wind up on the queues of another processor (which could execute in
parallel).  Either scenario is not what was truly desired.

This patch adds a new flag, TG3_FLAG_RESET_TASK_PENDING, and uses it to
determine whether or not to schedule another run of tg3_reset_task().
With the new flag comes two new functions to facilitate scheduling and
descheduling of tg3_reset_task().

(backport from commit db21997379906fe7657d360674e1106d80b020a4)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Obtain PCI function number from device
Matt Carlson [Fri, 4 Nov 2011 09:15:02 +0000 (09:15 +0000)]
tg3: Obtain PCI function number from device

This patch adds code to attempt to obtain the PCI function number from
the device rather than accept the number handed by the kernel.  In
pass-through scenarios, the function number handed by the kernel may not
reflect the true function of the device.

(cherry picked from commit 9dc5e342703948ea7b086d063c85c0e79dac8149)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Fix irq alloc error cleanup path
Matt Carlson [Fri, 4 Nov 2011 09:15:01 +0000 (09:15 +0000)]
tg3: Fix irq alloc error cleanup path

This patch fixes a bug where the irq error cleanup path did not free all
the resources it allocated.

(cherry picked from commit 5bc09186deba2a016b60aa3923fc0e42838ce877)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Ben Li <benli@broadcom.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Fix 4k skb error recovery path
Matt Carlson [Fri, 4 Nov 2011 09:15:00 +0000 (09:15 +0000)]
tg3: Fix 4k skb error recovery path

On the error recovery resource unwind path, it is possible for the
driver to attempt to unmap a fragment that hadn't been mapped.  This
patch fixes the problem by correcting the "last" parameter supplied.

(cherry picked from commit ba1142e4fb291c7bf124d93596351dca8d226a0f)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Fix 4k tx bd segmentation code
Joe Jin [Tue, 15 May 2012 13:18:45 +0000 (21:18 +0800)]
tg3: Fix 4k tx bd segmentation code

The new 4k tx bd segmentation code had a bug in the error cleanup path.
If the driver did not map all the physical fragments, the abort path
would wind up advancing the producer index beyond the point where the
setup code stopped.  This would ultimately turn into a tx recovery error
where the driver would expect the skb pointer to be set when it isn't.
This patch fixes the problem, and then makes the code a little easier to
understand.

(backport from commit b9e454826f22e17d1945bd282834c87aef8d0f95)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Fix APE mutex init and use
Matt Carlson [Fri, 4 Nov 2011 09:14:58 +0000 (09:14 +0000)]
tg3: Fix APE mutex init and use

APE mutex register blocks are shared by all ports of multiport devices.
For some mutexing purposes, each function is assigned their own
register.  For other cases, each function is assigned its own request
and grant bits of a single register.  For the latter cases, the tg3
driver is incorrectly allowing each function to use the same set of
grant / request bits.  This patch fixes the code so that each function
uses the appropriate bitset.

(cherry picked from commit 78f94dc7b10d98cf4cf8498d98581500d910c6b7)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: add tx_dropped counter
Joe Jin [Tue, 15 May 2012 13:16:48 +0000 (21:16 +0800)]
tg3: add tx_dropped counter

If a frame cant be transmitted, it is silently discarded.

Add a counter to report these errors to user.

(backport from commit 48855432047c9de7ea9987349de4c47d48ade8d1)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: fix tigon3_dma_hwbug_workaround()
Eric Dumazet [Sat, 22 Oct 2011 07:29:53 +0000 (03:29 -0400)]
tg3: fix tigon3_dma_hwbug_workaround()

Ari got kernel panics using tg3 NIC, and bisected to 2669069aacc9 "tg3:
enable transmit time stamping."

This is because tigon3_dma_hwbug_workaround() might alloc a new skb and
free the original. We panic when skb_tx_timestamp() is called on freed
skb.

Reported-by: Ari Savolainen <ari.m.savolainen@gmail.com>
(cherry picked from commit f7ff19871bb4a3451e1ca2cf660bf633018cfbec)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Remove unnecessary driver assignments of ethtool_ringparam fields to zero
Joe Jin [Tue, 15 May 2012 13:13:07 +0000 (21:13 +0800)]
tg3: Remove unnecessary driver assignments of ethtool_ringparam fields to zero

Per comments from Ben Hutchings on a previous patch, sweep the floors
a little removing unnecessary assignments of zero to fields of struct
ethtool_ringparam in driver code supporting ethtool -g.

This backport from commit 8b0c11679fd37522d8d34a76101319a085d80912
Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Code movement
Matt Carlson [Wed, 31 Aug 2011 11:44:54 +0000 (11:44 +0000)]
tg3: Code movement

This patch just moves some code around for better organization.

(cherry picked from commit 93a700a9d20b05b3c3c85efc53ac840499c2e103)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Eliminate tg3_halt_cpu() prototype
Matt Carlson [Wed, 31 Aug 2011 11:44:53 +0000 (11:44 +0000)]
tg3: Eliminate tg3_halt_cpu() prototype

This patch moves the implementatino of tg3_halt_cpu() earlier in the
file to eliminate its prototype.

(cherry picked from commit 997b4f135b8dffea812eda0311c142873804a785)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Eliminate tg3_write_sig_post_reset() prototype
Matt Carlson [Wed, 31 Aug 2011 11:44:52 +0000 (11:44 +0000)]
tg3: Eliminate tg3_write_sig_post_reset() prototype

This patch moves the implementation of tg3_write_sig_post_reset()
earlier to eliminate its prototype.

(cherry picked from commit fd6d3f0ec7050681f65445a38f81c43caea15ea6)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Eliminate tg3_stop_fw() prototype
Matt Carlson [Wed, 31 Aug 2011 11:44:51 +0000 (11:44 +0000)]
tg3: Eliminate tg3_stop_fw() prototype

This patch moves tg3_stop_fw() earlier in the file to eliminate its
prototype.

(cherry picked from commit 8d5a89b3da78fd4cb17b261bf9d3b016c2120cac)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Remove tp->rx_offset term when unneeded
Matt Carlson [Wed, 31 Aug 2011 11:44:49 +0000 (11:44 +0000)]
tg3: Remove tp->rx_offset term when unneeded

This patch removes the tp->rx_offset term if NET_IP_ALIGN is defined to
zero.

(cherry picked from commit 81389f57150ca84c9517a6ab2338f57badef4219)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Fix missed MSI workaround
Matt Carlson [Wed, 31 Aug 2011 11:44:48 +0000 (11:44 +0000)]
tg3: Fix missed MSI workaround

This patch fixes a minor counter initialization bug and makes the MSI
workaround slightly more efficient by attempting to service pending
interrupts before applying the workaround.

(cherry picked from commit 7f23073515c83e8a7261462329b6f26f211126d7)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Workaround tagged status update bug
Matt Carlson [Mon, 13 Jun 2011 13:38:55 +0000 (13:38 +0000)]
tg3: Workaround tagged status update bug

On rare occasions, writing the tag to the interrupt mailbox does not
reenable interrupts.  This patch fixes the problem by reissuing the
mailbox update.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 0e6cf6a9e3cf911577b1dde0dc724f634e4ca119)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Add ability to turn off 1shot MSI
Matt Carlson [Wed, 31 Aug 2011 11:44:50 +0000 (11:44 +0000)]
tg3: Add ability to turn off 1shot MSI

In older devices, 1-shot MSI mode had to be enabled by the code.  In
newer devices however, 1-shot MSI mode is enabled by default; code would
be needed to disable it.

Disabling 1-shot MSI mode is useful when debugging.  This patch changes
the code so that the TG3_FLAG_1SHOT_MSI accurately reflects (and
controls) the state of 1-shot MSI mode.

(cherry picked from commit 7f23073515c83e8a7261462329b6f26f211126d7)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Check all adv bits when checking config
Matt Carlson [Wed, 31 Aug 2011 11:44:47 +0000 (11:44 +0000)]
tg3: Check all adv bits when checking config

This patch makes sure the driver checks all advertisement bits when
checking the current hw advertisements.

(cherry picked from commit b99d2a57b7d9e9e64e9193d70696b77ed035c311)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Update version to 3.120
Matt Carlson [Fri, 19 Aug 2011 13:58:24 +0000 (13:58 +0000)]
tg3: Update version to 3.120

This patch updates the tg3 version to 3.120.

(cherry picked from commit eaa36660de7e174498618d69d7277d44a2f24c3d)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Add external loopback support to selftest
Matt Carlson [Fri, 19 Aug 2011 13:58:23 +0000 (13:58 +0000)]
tg3: Add external loopback support to selftest

This patch adds external loopback support to tg3's ethtool selftest.

(cherry picked from commit 941ec90f35603f35466988efd01395377fd00475)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agonet: add external loopback test in ethtool self test
Amit Kumar Salecha [Wed, 29 Jun 2011 20:00:49 +0000 (20:00 +0000)]
net: add external loopback test in ethtool self test

External loopback test can be performed by application without any driver
support on normal Ethernet cards.
But on CNA devices, where multiple functions share same physical port.
Here internal loopback test and external loopback test can be initiated by
multiple functions at same time. To co exist all functions, firmware need
to regulate what test can be run by which function. So before performing external
loopback test, command need to send to firmware, which will quiescent other functions.

User may not want to run external loopback test always. As special cable need to be
connected for this test.
So adding explicit flag in ethtool self test, which will specify interface
to perform external loopback test.
 ETH_TEST_FL_EXTERNAL_LB: Application set to request external loopback test
 ETH_TEST_FL_EXTERNAL_LB_DONE: Driver ack if test performed

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 0209bcd4d9ee66569d4ea76f9ab2de3a9c740c71)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Restructure tg3_test_loopback
Matt Carlson [Fri, 19 Aug 2011 13:58:22 +0000 (13:58 +0000)]
tg3: Restructure tg3_test_loopback

The tg3_test_loopback() function is starting to get more complicated as
more loopback tests are added.  This patch cleans up the code.

(cherry picked from commit 28a4595786a64fb51d41c0bad819256198525e49)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Pull phy int lpbk setup into separate func
Matt Carlson [Fri, 19 Aug 2011 13:58:21 +0000 (13:58 +0000)]
tg3: Pull phy int lpbk setup into separate func

This patch pulls out the internal phy loopback setup code into a
separate function.  This cleans up the loopback test code and makes it
available for NETIF_F_LOOPBACK support later.

(cherry picked from commit 5e5a7f371ffea4b5aeca60253f912e0b36391495)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Consilidate MAC loopback code
Matt Carlson [Fri, 19 Aug 2011 13:58:20 +0000 (13:58 +0000)]
tg3: Consilidate MAC loopback code

The driver puts the device into MAC loopback in two places in the
driver.  This patch consolidates the code into a single routine.

(cherry picked from commit 6e01b20b21d6b2131f27a7c068ff71a7fbe58796)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Remove dead code
Matt Carlson [Fri, 19 Aug 2011 13:58:19 +0000 (13:58 +0000)]
tg3: Remove dead code

Now that CPMU devices don't do MAC loopback, all the CPMU power saving
mode adjustments are unneeded.  This patch removes the dead code.

(cherry picked from commit 2215e24ceb74b701c34b2ebe7cdc96e5509ac565)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Remove 5719 jumbo frames and TSO blocks
Matt Carlson [Wed, 27 Jul 2011 14:20:54 +0000 (14:20 +0000)]
tg3: Remove 5719 jumbo frames and TSO blocks

The A0 revision of this chip is the only device that requires these
features to be disabled.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit a051294423b015c5c89f2ed78f7fe0893b775098)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Break larger frags into 4k chunks for 5719
Matt Carlson [Wed, 27 Jul 2011 14:20:53 +0000 (14:20 +0000)]
tg3: Break larger frags into 4k chunks for 5719

The 5719 has bug where RDMAs larger than 4k can cause problems.  This
patch works around the problem by dividing larger DMA requests into
something the hardware can handle.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e31aa9870627106aebddd280aab8ecb2f493246a)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Add tx BD budgeting code
Matt Carlson [Wed, 27 Jul 2011 14:20:52 +0000 (14:20 +0000)]
tg3: Add tx BD budgeting code

As the driver breaks large skb fragments into smaller submissions to the
hardware, there is a new danger that BDs might get exhausted before all
fragments have been mapped.  This patch adds code to make sure tx BDs
aren't oversubscribed and flag the condition if it happens.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 84b67b27e9531e9a70c9e8cd952d66c55f4d0ddb)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Consolidate code that calls tg3_tx_set_bd()
Matt Carlson [Wed, 27 Jul 2011 14:20:51 +0000 (14:20 +0000)]
tg3: Consolidate code that calls tg3_tx_set_bd()

This patch consolidates all code that populates tx BDs into a single
routine.  Setting tx BDs needs to be more carefully controlled to see if
workarounds need to be applied.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit d1a3b7377d3b6a01ec5f70adb32173b13233aabf)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Add partial fragment unmapping code
Matt Carlson [Wed, 27 Jul 2011 14:20:50 +0000 (14:20 +0000)]
tg3: Add partial fragment unmapping code

The following patches are going to break skb fragments into smaller
sizes.  This patch attempts to make the change easier to digest by only
addressing the skb teardown portion.

The patch modifies the driver to skip over any BDs that have a flag set
that indicates the BD isn't the beginning of an skb fragment.  Such BDs
were a result of segmentation and do not need a pci_unmap_page() call.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e01ee14d499e5d09c0a9db0cac2545a018849e3d)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Generalize tg3_skb_error_unmap()
Matt Carlson [Wed, 27 Jul 2011 14:20:49 +0000 (14:20 +0000)]
tg3: Generalize tg3_skb_error_unmap()

In the following patches, unmapping skb fragments will get just as
complicated as mapping them.  This patch generalizes
tg3_skb_error_unmap() and makes it the one-stop-shop for skb unmapping.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 0d681b27b0efc962a3038a316e78373de7bfe1ce)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Remove short DMA check for 1st fragment
Matt Carlson [Wed, 27 Jul 2011 14:20:48 +0000 (14:20 +0000)]
tg3: Remove short DMA check for 1st fragment

The first fragment of an skb should always be greater than 8 bytes.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 13350ea78bd687a229af0f6052d2f45aa50a6524)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Simplify tx bd assignments
Matt Carlson [Wed, 27 Jul 2011 14:20:47 +0000 (14:20 +0000)]
tg3: Simplify tx bd assignments

In the following patches, the process the driver will use to assign skb
fragments to transmit BDs will get more complicated.  To prepare for
that new code, this patch seeks to simplify how transmit BDs are
populated.  It does this by separating the code that assigns the BD
members from the logic that controls how the fields are set.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 92cd3a17ce9c719abb4c28dee3438e0c641f8de4)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Reintroduce tg3_tx_ring_info
Matt Carlson [Wed, 27 Jul 2011 14:20:46 +0000 (14:20 +0000)]
tg3: Reintroduce tg3_tx_ring_info

The following patches will require the use of an additional flag in the
ring_info structure.  The use of this flag is tx path specific, so this
patch defines a specialized ring_info structure.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit df8944cf5cd3794c46e95e0404038376ee7f8dda)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Fix NVRAM selftest failures for 5720 devs
Matt Carlson [Wed, 20 Jul 2011 10:20:57 +0000 (10:20 +0000)]
tg3: Fix NVRAM selftest failures for 5720 devs

This patch fixes NVRAM selftest failures for 5720 devices by fixing the
checksum area size.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit bda18faf630ae3731f4b4e8f4b94a26e326c4797)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Add more selfboot formats to NVRAM selftest
Matt Carlson [Mon, 13 Jun 2011 13:38:58 +0000 (13:38 +0000)]
tg3: Add more selfboot formats to NVRAM selftest

This patch adds more selfboot formats to the NVRAM selftest.  It also
changes the code to return an error on an unsupported NVRAM format.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 727a6d9f39604b5592e474295960fceeb523ae4f)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Return size from tg3_vpd_readblock()
Matt Carlson [Wed, 20 Jul 2011 10:20:56 +0000 (10:20 +0000)]
tg3: Return size from tg3_vpd_readblock()

Newer VPD datablocks can exceed the size the tg3 driver is traditionally
used to.  This can cause some of the routines that operate on the VPD
data to fail when in-fact they could have succeeded had they known the
correct size.  This patch fixes the problem.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 535a490eaddab484c53717fe2feeba800c9cdda2)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Fix RSS indirection table distribution
Matt Carlson [Wed, 20 Jul 2011 10:20:54 +0000 (10:20 +0000)]
tg3: Fix RSS indirection table distribution

The current RSS indirection table is populated such that more traffic
will hit the first RSS ring.  This patch adjusts the indirection table
so that the load is more evenly distributed.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 9d53fa129628d4899083b06fa66b7ca10fed8eb4)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Fix link down notify failure when EEE disabled
Matt Carlson [Wed, 20 Jul 2011 10:20:52 +0000 (10:20 +0000)]
tg3: Fix link down notify failure when EEE disabled

Occasionally, when the network cable is removed after a successful
autonegotiation, the device will not send a link down interrupt to the
driver.  This happens because of a bad interaction of an EEE
workaround.  The fix is to adjust the code so that the root cause
condition does not happen.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b715ce947f51c6637e78b262501f0c4ff9d848cc)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Fix link flap at 100Mbps with EEE enabled
Matt Carlson [Wed, 20 Jul 2011 10:20:51 +0000 (10:20 +0000)]
tg3: Fix link flap at 100Mbps with EEE enabled

This patch increases the scope of the EEE interoperability workaround
to include more asic revisions.  The workarond value is tuned to
workaround a link flap issue at 100Mbps.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit be671947b5b3efc6863ff429c1f265aa38e291db)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Match power source to driver state
Matt Carlson [Wed, 13 Jul 2011 09:27:33 +0000 (09:27 +0000)]
tg3: Match power source to driver state

Now that the driver state (and power source) is being more intensely
scrutinized, we need to make sure it is correct 100% of the time.  This
patch finds and fixes all dangling power state transitions.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit cd0d7228b4f0279f219bc555fa0192dc072d79cd)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Add function status reporting
Matt Carlson [Wed, 13 Jul 2011 09:27:32 +0000 (09:27 +0000)]
tg3: Add function status reporting

This patch adds code to update the status of the function to a common
location to the critical section added in the previous patch.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 3a1e19d383c7b91c8af52e8938ab60c40e3d26b3)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Create critical section around GPIO toggling
Matt Carlson [Wed, 13 Jul 2011 09:27:31 +0000 (09:27 +0000)]
tg3: Create critical section around GPIO toggling

The code that performs the power source switching will need to consider
the status of the other devices before making any switches.  The status
updates and power source switching will need to be an atomic operation,
so a critical section will be needed.  This patch establishes the
critical section through a CPMU mutex.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 6f5c8f8317d37045ffc7ea21dab8319a53c1ae57)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Determine PCI function number in one place
Matt Carlson [Wed, 13 Jul 2011 09:27:30 +0000 (09:27 +0000)]
tg3: Determine PCI function number in one place

tg3 devices will need to know exactly what function number they are so
that they can communicate their status to the other functions.  In a KVM
environment, the function number of a device presented by the kernel
might not be the true function number, so an alternative method to
determine the function number is needed.

This patch used to contain an implementation for the alternative method,
but recently we discovered a hardware bug that renders it incorrect.
While new method is not yet known, it is still useful to consolidate the
code that determines the PCI function to one location and use the
results throughout the code.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 69f11c9936ba310ed3620072983da6ed95e86cc0)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Check transitions to D0 power state
Matt Carlson [Wed, 13 Jul 2011 09:27:29 +0000 (09:27 +0000)]
tg3: Check transitions to D0 power state

Currently pci_set_power_state() does not return useful return codes for
transitions to the D0 power state.  If a device refuses to go into D0,
the PCI layer issues a warning but returns success.

Entering into D0 is a requirement for correct operation of tg3 devices
though.  If the PCI layer should be changed to return an error code for
this type of failure, the tg3 driver would be interested in catching it
and reacting to it.  This patch makes the necessary modifications.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit bed9829f3ec4b30d5cbec6511a11368ba5f169fb)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Create funcs for power source switching
Matt Carlson [Mon, 13 Jun 2011 13:39:02 +0000 (13:39 +0000)]
tg3: Create funcs for power source switching

The power source switching code is about to get a little more complex.
This patch seeks to simplify future power source switching patches by
clarifying the existing code.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 520b2756d9414cb6b0f6fc70714e95ee9248ebf4)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Move power state transitions to init_one
Matt Carlson [Wed, 13 Jul 2011 09:27:28 +0000 (09:27 +0000)]
tg3: Move power state transitions to init_one

The tg3 driver is going to require memory mapped register access much
sooner than before.  This patch makes sure the device is in the D0 power
state as soon as possible, and moves the code that enables the memory
arbiter outside tg3_get_eeprom_hw_cfg() where it can be more easily
monitored.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 168212858712b12c65e0fa1bec6c9c65808e7621)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Detect APE enabled devs earlier
Matt Carlson [Wed, 13 Jul 2011 09:27:27 +0000 (09:27 +0000)]
tg3: Detect APE enabled devs earlier

The following patch will require the driver to communicate with the APE
much sooner than before.  This patch make sure the APE registers are
memory mapped and that the ENABLE_APE bit is set before the first use.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit c9cab24e954867a03ab833ea3b4c0e6e607eb0d6)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: remove unnecessary read of PCI_CAP_ID_EXP
Jon Mason [Mon, 27 Jun 2011 12:56:50 +0000 (12:56 +0000)]
tg3: remove unnecessary read of PCI_CAP_ID_EXP

The PCIE capability offset is saved during PCI bus walking.  Use the
value from pci_dev instead of checking in the driver and saving it off
the the driver specific structure.  It will remove an unnecessary search
in the PCI configuration space if this value is referenced instead of
reacquiring it.

v2 of the patch re-adds the PCI_EXPRESS flag and adds comments
describing why it is necessary.

[ pdev->pcie_cap --> pci_pcie_cap(pdev) -DaveM ]

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 708ebb3a51489e70bc2b67b2772deea336eba849)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Migrate phy preprocessor defs to system defs
Matt Carlson [Mon, 13 Jun 2011 13:39:01 +0000 (13:39 +0000)]
tg3: Migrate phy preprocessor defs to system defs

This patch changes to code to use some of the preprocessor
definitions from mii.h over its homegrown equivalents.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 221c56373ee7088dd3015b928782d5e70dc5074e)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Show flowctrl settings through get_settings()
Matt Carlson [Mon, 13 Jun 2011 13:39:00 +0000 (13:39 +0000)]
tg3: Show flowctrl settings through get_settings()

This patch adds code to present the flow control advertisements through
the ethtool get_settings callback.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit 5bb09778e2196770d218e82904f15b558d9a1e50)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Remove 4G_DMA_BNDRY_BUG flag
Matt Carlson [Mon, 13 Jun 2011 13:38:57 +0000 (13:38 +0000)]
tg3: Remove 4G_DMA_BNDRY_BUG flag

Now that all chips have this bug, the flag checks become useless code.
This patch removes the flag.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit eb69d564a3f34df602bd9b0fae94e14fad23de2d)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agotg3: Remove 40BIT_DMA_LIMIT_BUG
Matt Carlson [Mon, 13 Jun 2011 13:38:56 +0000 (13:38 +0000)]
tg3: Remove 40BIT_DMA_LIMIT_BUG

This patch removes the 40BIT_DMA_LIMIT_BUG flag.  There already exists a
flag for this purpose (TG3_FLAG_40BIT_DMA_BUG) and was already being
used in the correct spot.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit daf9a55387df8f429d1219bbdabba1ab33d2a479)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: use find_first_zero_bit
Akinobu Mita [Fri, 20 Jan 2012 15:15:27 +0000 (00:15 +0900)]
[SCSI] hpsa: use find_first_zero_bit

Use find_first_zero_bit to find the first cleared bit in a memory region.

This also includes the following minor changes.
- Use bitmap_zero
- Reduce unnecessary atomic bitops usage

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 263d9401a332ccec8945841dbc57707dcba1ec7d)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: combine hpsa_scsi_detect and hpsa_register_scsi
Stephen M. Cameron [Thu, 19 Jan 2012 20:00:53 +0000 (14:00 -0600)]
[SCSI] hpsa: combine hpsa_scsi_detect and hpsa_register_scsi

hpsa_register_scsi just calls hpsa_scsi_detect.  Move
the guts of hpsa_scsi_detect into hpsa_register_scsi and
get rid of hpsa_scsi_detect.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit b705690d8d16f7081be3637c0bda2a681f02ecf4)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: removed unneeded structure member max_sg_entries and fix badly named...
Stephen M. Cameron [Thu, 19 Jan 2012 20:00:48 +0000 (14:00 -0600)]
[SCSI] hpsa: removed unneeded structure member max_sg_entries and fix badly named constant MAXSGENTRIES

We had both h->max_sg_entries and h->maxsgentries in the per controller
structure which is terribly confusing.  max_sg_entries was really
just a constant, 32, which defines how big the "block fetch table"
is, which is as large as the max number of SG elements embedded
within a command (excluding SG elements in chain blocks).

MAXSGENTRIES was the constant used to denote the max number of SG
elements embedded within a command, also a poor name.

So renamed MAXSGENTREIS to SG_ENTRIES_IN_CMD, and removed
h->max_sg_entries and replaced it with SG_ENTRIES_IN_CMD.

h->maxsgentries is unchanged, and is the maximum number of sg
elements the controller will support in a command, including
those in chain blocks, minus 1 for the chain block pointer..

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit d66ae08bad182e9a87859e120e61cfd51e402ed8)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: fix per device memory leak on driver unload
Stephen M. Cameron [Thu, 19 Jan 2012 20:00:42 +0000 (14:00 -0600)]
[SCSI] hpsa: fix per device memory leak on driver unload

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 55e14e764df5e24bedf93220f1da167af8300c2f)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: do not sleep in atomic context in rmmod path.
Stephen M. Cameron [Thu, 5 Jan 2012 16:15:31 +0000 (10:15 -0600)]
[SCSI] hpsa: do not sleep in atomic context in rmmod path.

Don't call kthread_stop with a spin lock held and interrupts
disabled because kthread_stop will sleep waiting for the thread
to stop.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 775bf2773858c50d2acfcdf71889984be94e7037)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: fix flush cache transfer length
Stephen M. Cameron [Wed, 26 Oct 2011 21:21:17 +0000 (16:21 -0500)]
[SCSI] hpsa: fix flush cache transfer length

We weren't filling in the transfer length of the
flush cache command (it transfers 4 bytes of zeroes).
Firmware didn't seem to be bothered by this, but it
should be fixed.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit bb158eabda984851d7964d968b9859383f98a701)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: set max sectors instead of taking the default
Stephen M. Cameron [Wed, 26 Oct 2011 21:20:53 +0000 (16:20 -0500)]
[SCSI] hpsa: set max sectors instead of taking the default

Set the max hardware sectors in the SCSI host template to 8192
to allow for larger i/o's (8192 is the same limit the cciss
driver currently has.)

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit c0d6a4d17b3848750b0285861b7a807811a0cfa6)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: detect controller lockup
Stephen M. Cameron [Wed, 26 Oct 2011 21:22:04 +0000 (16:22 -0500)]
[SCSI] hpsa: detect controller lockup

When controller lockup condition is detected,
we should fail all outstanding commands and disable
the controller.  This will enable multipath solutions
to recover gracefully.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit a0c124137a40fc22730ae87caf17e821f2dce1ed)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: remove unused busy_initializing and busy_scanning
Stephen M. Cameron [Wed, 26 Oct 2011 21:20:58 +0000 (16:20 -0500)]
[SCSI] hpsa: remove unused busy_initializing and busy_scanning

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 03ab31f4c14f259bfa160543c83dbfd93d6fb3e2)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agocciss: fix flush cache transfer length
Stephen M. Cameron [Mon, 28 Nov 2011 19:12:05 +0000 (20:12 +0100)]
cciss: fix flush cache transfer length

We weren't filling in the transfer length of the
flush cache command (it transfers 4 bytes of zeroes).
Firmware didn't seem to be bothered by this, but it
should be fixed.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit 59bd71a81b66990564eac69aedd28ad87a2c81f4)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agocciss: auto engage SCSI mid layer at driver load time
Stephen M. Cameron [Wed, 16 Nov 2011 08:21:49 +0000 (09:21 +0100)]
cciss: auto engage SCSI mid layer at driver load time

A long time ago, probably in 2002, one of the distros, or maybe more than
one, loaded block drivers prior to loading the SCSI mid layer.  This meant
that the cciss driver, being a block driver, could not engage the SCSI mid
layer at init time without panicking, and relied on being poked by a
userland program after the system was up (and the SCSI mid layer was
therefore present) to engage the SCSI mid layer.

This is no longer the case, and cciss can safely rely on the SCSI mid
layer being present at init time and engage the SCSI mid layer straight
away.  This means that users will see their tape drives and medium
changers at driver load time without need for a script in /etc/rc.d that
does this:

for x in /proc/driver/cciss/cciss*
do
echo "engage scsi" > $x
done

However, if no tape drives or medium changers are detected, the SCSI mid
layer will not be engaged.  If a tape drive or medium change is later
hot-added to the system it will then be necessary to use the above script
or similar for the device(s) to be acceesible.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit 0007a4c90a11a5371c8b3f80b220fa402a399189)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoThe Windows driver .inf disables ASPM on all cciss devices. Do the same.
Matthew Garrett [Fri, 11 Nov 2011 21:05:54 +0000 (22:05 +0100)]
The Windows driver .inf disables ASPM on all cciss devices. Do the same.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: iss_storagedev@hp.com
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit 193733585692301f38d489b8ad8724c2f88349c0)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agocciss: add transport mode attribute to sys
Joe Handzik [Mon, 8 Aug 2011 09:40:17 +0000 (11:40 +0200)]
cciss: add transport mode attribute to sys

Signed-off-by: Joseph Handzik <joseph.t.handzik@beardog.cce.hp.com>
Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
(cherry picked from commit f963d270cb7bbb8eeb57901d02b22a493e664fd2)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agocciss: Adds simple mode functionality
Joseph Handzik [Mon, 8 Aug 2011 09:40:15 +0000 (11:40 +0200)]
cciss: Adds simple mode functionality

Signed-off-by: Joseph Handzik <joseph.t.handzik@beardog.cce.hp.com>
Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
(cherry picked from commit 13049537007dee73a76f0a30fcbc24d02c6fa9e4)

Conflicts:

drivers/block/cciss.c

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: update device attributes when they change
Scott Teel [Thu, 19 Jan 2012 20:01:30 +0000 (14:01 -0600)]
[SCSI] hpsa: update device attributes when they change

Certain types of changes to devices should not be interpreted as a device
change that would cause the device to be removed and re-added.  These include
RAID level and Firmware revision changes.  However, these attribute changes DO
need to be reflected in the controller info structure's dev structure list, so
that sysfs and /proc info files for the devices will reflect the new values.

Signed-off-by: Scott Teel <scott.stacy.teel@hp.com>
Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit bd9244f7b9508a5945dcbd015db334110a9cdecf)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: improve naming on external target device functions
Scott Teel [Thu, 19 Jan 2012 20:01:25 +0000 (14:01 -0600)]
[SCSI] hpsa: improve naming on external target device functions

Reduce confusion and inaccuracy caused by dated naming of vars and functions
referring to external target devices.

CURRENT NAMING:                PROPOSED NAMING:

"MSA2xxx devices"              "external target devices"
msa2xxx_model                  ext_target_model
is_msa2xxx                     is_ext_target
add_msa2xxx_enclosure          add_ext_target_dev
nmsa2xxx_enclosures            n_ext_target_devs

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 4f4eb9f1d8f8eb91d0dd486deafd4800b425f289)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: eliminate 8 external target limitation
Scott Teel [Thu, 19 Jan 2012 20:01:19 +0000 (14:01 -0600)]
[SCSI] hpsa: eliminate 8 external target limitation

Driver limits SAS external target IDs to range 1-8.
Need to increase limit and clean up overlapping concepts of targets and paths
in the code.

There are several defined constants that control this:
HPSA_MAX_TARGETS_PER_CTLR     16
MAX_MSA2XXX_ENCLOSURES        32
HPSA_MAX_PATHS                8

We can condense this to one constant:
MAX_EXT_TARGETS               32

SAS switches allow for 8 connections, and there is capacity for 4 switches per
enclosure in largest blade enclosure type.

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit aca4a5200dc2b0835f5477d6609a05b0401a91f3)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: fix potential array overflow in hpsa_update_scsi_devices
Scott Teel [Wed, 26 Oct 2011 21:21:12 +0000 (16:21 -0500)]
[SCSI] hpsa: fix potential array overflow in hpsa_update_scsi_devices

The currentsd[] array in hpsa_update_scsi_devices had room for
256 devices.  The code was iterating over however many physical
and logical devices plus an additional number of possible external
MSA2XXX controllers, which together could potentially exceed 256.

We increased the size of the currentsd array to 1024 + 1024 + 32 + 1
elements to reflect a reasonable maximum possible number of devices
which might be encountered.  We also don't just walk off the end
of the array if the array controller reports more devices than we
are prepared to handle, we just ignore the excessive devices.

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit b7ec021fe6fe979dbd4e62604a4942f964b12864)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: rename HPSA_MAX_SCSI_DEVS_PER_HBA
Scott Teel [Wed, 26 Oct 2011 21:21:07 +0000 (16:21 -0500)]
[SCSI] hpsa: rename HPSA_MAX_SCSI_DEVS_PER_HBA

Rename HPSA_MAX_SCSI_DEVS_PER_HBA to HPSA_MAX_DEVICES

Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit cfe5badcab2e993e71ebebbc07c21c270e5580c0)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: refactor hpsa_figure_bus_target_lun
Stephen M. Cameron [Thu, 19 Jan 2012 20:01:14 +0000 (14:01 -0600)]
[SCSI] hpsa: refactor hpsa_figure_bus_target_lun

It should call hpsa_set_bus_target_lun rather
than individually setting bus, target and lun.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 1f310bde4631185d4462dbd544b3fa82513cdb6f)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: make target and lun match what SCSI REPORT LUNs returns
Stephen M. Cameron [Thu, 19 Jan 2012 20:01:09 +0000 (14:01 -0600)]
[SCSI] hpsa: make target and lun match what SCSI REPORT LUNs returns

Some distros have a "rescan-scsi-bus.sh" script which depends on
SCSI REPORT LUNs not reporting something different than what the
driver tells the kernel, even if the driver uses scan_start and
scan_finished methods of the SCSI host template to override the
usual SCSI midlayer discovery code.  Previously, 1 was added to
the LUN to make room to insert the RAID controller device at
LUN 0.  Now, the RAID controller is moved to bus 3, and 1 is no
longer added to the LUN.  However, SCSI REPORT LUNS on Smart Array
doesn't report physical devices like tape drives or auto-loaders
as it turns out, so those particular device types still won't match.
Generally the logical drives are reported first however, so at
least those should match.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit bbef6c0ce8046114c07f5b6a62ce6a239503dd61)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] hpsa: Fix problem with MSA2xxx devices
Stephen M. Cameron [Thu, 19 Jan 2012 20:01:04 +0000 (14:01 -0600)]
[SCSI] hpsa: Fix problem with MSA2xxx devices

Upgraded firmware on Smart Array P7xx (and some others) made them show up as
SCSI revision 5 devices and this caused the driver to fail to map MSA2xxx
logical drives to the correct bus/target/lun.  A symptom of this would be that
the target ID of the logical drives as presented by the external storage array
is ignored, and all such logical drives are assigned to target zero,
differentiated only by LUN.  Some multipath software reportedly does not deal
well with this behavior, failing to recognize different paths to the same
device as such.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Scott Teel <scott.teel@hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 9bc3711cbb67ac620bf09b4a147cbab45b2c36c0)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[scsi] hpsa: Add IRQF_SHARED back in for the non-MSI(X) interrupt handler
Joe Jin [Tue, 15 May 2012 06:41:33 +0000 (14:41 +0800)]
[scsi] hpsa: Add IRQF_SHARED back in for the non-MSI(X) interrupt handler

Add IRQF_SHARED back in for the non-MSI(X) interrupt handler.
This backport from RHEL6U3.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoSPEC: v2.6.39-200.9.0
Maxim Uvarov [Fri, 11 May 2012 00:11:09 +0000 (17:11 -0700)]
SPEC: v2.6.39-200.9.0

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years ago[SCSI] scsi_dh_rdac: Fix for unbalanced reference count
Moger, Babu [Thu, 2 Feb 2012 15:21:54 +0000 (15:21 +0000)]
[SCSI] scsi_dh_rdac: Fix for unbalanced reference count

Orabug: 14059970
This patch fixes an unbalanced refcount issue.

Elevating the lock for both kref_put and also for controller node deletion.
Previously, controller deletion was protected but the not the kref_put. This
was causing the other thread to pick up the controller structure which was
already kref'd zero.

This was causing the following WARN_ON and also sometimes panic.

WARNING: at lib/kref.c:43 kref_get+0x2d/0x30() (Not tainted)
Hardware name: IBM System x3655 -[7985AC1]-
Modules linked in: fuse scsi_dh_rdac autofs4 nfs lockd fscache nfs_acl
auth_rpcgss sunrpc 8021q garp stp llc ipv6 ib_srp(U) scsi_transport_srp
scsi_tgt ib_cm(U) ib_sa(U) ib_uverbs(U) ib_umad(U) mlx4_ib(U) mlx4_core(U)
ib_mthca(U) ib_mad(U) ib_core(U) dm_mirror dm_region_hash dm_log dm_round_robin
dm_multipath uinput bnx2 ses enclosure sg ibmpex ibmaem ipmi_msghandler
serio_raw k8temp hwmon amd64_edac_mod edac_core edac_mce_amd shpchp i2c_piix4
ext4 mbcache jbd2 sr_mod cdrom sd_mod crc_t10dif sata_svw pata_acpi ata_generic
pata_serverworks aacraid radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core
dm_mod [last unloaded: freq_table]
Pid: 13735, comm: srp_daemon Not tainted 2.6.32-71.el6.x86_64 #1
Call Trace:
[<ffffffff8106b857>] warn_slowpath_common+0x87/0xc0
[<ffffffff8106b8aa>] warn_slowpath_null+0x1a/0x20
[<ffffffff8125c39d>] kref_get+0x2d/0x30
[<ffffffffa01b4029>] rdac_bus_attach+0x459/0x580 [scsi_dh_rdac]
[<ffffffff8135232a>] scsi_dh_handler_attach+0x2a/0x80
[<ffffffff81352c7b>] scsi_dh_notifier+0x9b/0xa0
[<ffffffff814cd7a5>] notifier_call_chain+0x55/0x80
[<ffffffff8109711a>] __blocking_notifier_call_chain+0x5a/0x80
[<ffffffff81097156>] blocking_notifier_call_chain+0x16/0x20
[<ffffffff8132bec5>] device_add+0x515/0x640
[<ffffffff813329e4>] ? attribute_container_device_trigger+0xc4/0xe0
[<ffffffff8134f659>] scsi_sysfs_add_sdev+0x89/0x2c0
[<ffffffff8134d096>] scsi_probe_and_add_lun+0xea6/0xed0
[<ffffffff8134beb2>] ? scsi_alloc_target+0x292/0x2d0
[<ffffffff8134d1e1>] __scsi_scan_target+0x121/0x750
[<ffffffff811df806>] ? sysfs_create_file+0x26/0x30
[<ffffffff8132b759>] ? device_create_file+0x19/0x20
[<ffffffff81332838>] ? attribute_container_add_attrs+0x78/0x90
[<ffffffff814b008c>] ? klist_next+0x4c/0xf0
[<ffffffff81332e30>] ? transport_configure+0x0/0x20
[<ffffffff813329e4>] ? attribute_container_device_trigger+0xc4/0xe0
[<ffffffff8134df40>] scsi_scan_target+0xd0/0xe0
[<ffffffffa02f053a>] srp_create_target+0x75a/0x890 [ib_srp]
[<ffffffff8132a130>] dev_attr_store+0x20/0x30
[<ffffffff811df145>] sysfs_write_file+0xe5/0x170
[<ffffffff8116c818>] vfs_write+0xb8/0x1a0
[<ffffffff810d40a2>] ? audit_syscall_entry+0x272/0x2a0
[<ffffffff8116d251>] sys_write+0x51/0x90
[<ffffffff81013172>] system_call_fastpath+0x16/0x1b

Signed-off-by: Babu Moger <babu.moger@netapp.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] scsi_dh_rdac: Adding couple more vendor product ids
Moger, Babu [Fri, 2 Sep 2011 15:21:17 +0000 (11:21 -0400)]
[SCSI] scsi_dh_rdac: Adding couple more vendor product ids

Orabug: 14059970
This patch adds couple more Vendor/Product IDs for RDAC.. There are no
functional changes.

Signed-off-by: Babu Moger <babu.moger@netapp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] dh_rdac: Associate HBA and storage in rdac_controller to support partitions...
Chandra Seetharaman [Wed, 27 Jul 2011 18:22:56 +0000 (11:22 -0700)]
[SCSI] dh_rdac: Associate HBA and storage in rdac_controller to support partitions in storage

Orabug: 14059970
rdac hardware handler assumes that there is one-to-one relation ship
between the host and the controller w.r.t lun.  IOW, it does not
support "multiple storage partitions" within a storage.

Example:
HBA1 and HBA2 see lun 0 and 1 in storage A (1)
HBA3 and HBA4 see lun 0 and 1 in storage A (2)
HBA5 and HBA6 see lun 0 and 1 in storage A (3)

luns 0 and 1 in (1), (2) and (3) are totally different.

But, rdac handler treats the lun 0s (and lun 1s) as the same when
sending a mode select to the controller, which is wrong.

This patch makes the rdac hardware handler associate HBA and the
storage w.r.t lun (and not the host itself).

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years ago[SCSI] dh_rdac: Use WWID from C8 page instead of Subsystem id from C4 page to identif...
Chandra Seetharaman [Wed, 20 Jul 2011 21:18:56 +0000 (14:18 -0700)]
[SCSI] dh_rdac: Use WWID from C8 page instead of Subsystem id from C4 page to identify storage

Orabug: 14059970
rdac hardware handler uses "Subsystem Identifier" from C4 inquiry page
to uniquely identify a storage. The problem with that is that if any
any of the bytes are non-ascii, subsys_id will all be spaces (hex
0x20). This creates lot of problems especially when there are multiple
rdac storages are connected to the server.

Use "Storage Array Unique Identifier" from C8 inquiry page, which is the
world wide unique identifier for the storage array, to uniquely identify
the storage.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years agokernel config: turn on sxge and sxgevf drivers
Maxim Uvarov [Thu, 10 May 2012 21:22:58 +0000 (14:22 -0700)]
kernel config: turn on sxge and sxgevf drivers

Signei-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agosxge/sxgevf: add new driver
Maxim Uvarov [Thu, 10 May 2012 20:28:36 +0000 (13:28 -0700)]
sxge/sxgevf: add new driver

Orabug: 13444150
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agobe2iscsi: adding functionality to change network settings using iscsiadm
root [Wed, 2 May 2012 14:36:21 +0000 (20:06 +0530)]
be2iscsi: adding functionality to change network settings using iscsiadm

 This patch allows iscsiadm to set/ delete static IP and enable /disable
 DHCP.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: root <root@localhost.(none)>
13 years agobe2iscsi: Adding bsg interface for be2iscsi
root [Wed, 2 May 2012 14:34:18 +0000 (20:04 +0530)]
be2iscsi: Adding bsg interface for be2iscsi

 This patch enables bsg interface for the be2iscsi driver

Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: root <root@localhost.(none)>
13 years agobe2iscsi: Get Initiator Name for the iSCSI_Host
root [Wed, 2 May 2012 14:29:13 +0000 (19:59 +0530)]
be2iscsi: Get Initiator Name for the iSCSI_Host

 Implement the ISCSI_HOST_PARAM_INITIATOR_NAME for .get_host_param

Signed-off-by: root <root@localhost.(none)>
13 years agobe2iscsi: Return async handle of unknown opcode to free list.
root [Wed, 2 May 2012 14:26:56 +0000 (19:56 +0530)]
be2iscsi: Return async handle of unknown opcode to free list.

 The async handle corresponding to unknown Opcode was not freed
 earlier. This code does the fix for that.

Signed-off-by: root <root@localhost.(none)>
13 years agobe2iscsi: Check ASYNC PDU Handle corresponds to HDR/DATA Handle
root [Wed, 2 May 2012 14:25:07 +0000 (19:55 +0530)]
be2iscsi: Check ASYNC PDU Handle corresponds to HDR/DATA Handle

 For each ASYNC PDU received there is an HDR and DATA handle for it.
 There will be only 1 HDR ASYNC Handle, but DATA Handle can be more
 than 1 for each ASYNC PDU received. Checking if the ASYNC Handle
 correspongs to HDR or DATA while returning the Handle to the free list.
 hwi_free_async_msg just return the handles to the free list. No return
 values are needed so changing the return type to void.

Signed-off-by: root <root@localhost.(none)>
13 years agobe2iscsi:Bump the driver Version
root [Wed, 2 May 2012 14:21:56 +0000 (19:51 +0530)]
be2iscsi:Bump the driver Version

 This patch bumps the driver version
Signed-off-by: Minh Tran <MinhDuc.Tran@Emulex.Com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: root <root@localhost.(none)>