deliverable/linux.git
18 years agoMerge branch 'max-sect' into upstream
Jeff Garzik [Mon, 15 May 2006 15:27:47 +0000 (11:27 -0400)] 
Merge branch 'max-sect' into upstream

18 years agoMerge branch 'for-jeff' of git://htj.dyndns.org/libata-tj into tejun-merge
Jeff Garzik [Mon, 15 May 2006 15:26:53 +0000 (11:26 -0400)] 
Merge branch 'for-jeff' of git://htj.dyndns.org/libata-tj into tejun-merge

18 years agoMerge branch 'master' into upstream
Jeff Garzik [Mon, 15 May 2006 15:26:03 +0000 (11:26 -0400)] 
Merge branch 'master' into upstream

18 years ago[PATCH] sata_sil24: implement NCQ support
Tejun Heo [Mon, 15 May 2006 12:03:56 +0000 (21:03 +0900)] 
[PATCH] sata_sil24: implement NCQ support

Implement NCQ support.  Sil24 has 31 command slots and all of them are
used for NCQ command queueing.  libata guarantees that no other
command is in progress when it issues an internal command, so always
use tag 0 for internal commands.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] ahci: implement NCQ suppport
Tejun Heo [Mon, 15 May 2006 12:03:55 +0000 (21:03 +0900)] 
[PATCH] ahci: implement NCQ suppport

Implement NCQ support.

Original implementation is from Jens Axboe.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] ahci: kill pp->cmd_tbl_sg
Tejun Heo [Mon, 15 May 2006 12:03:53 +0000 (21:03 +0900)] 
[PATCH] ahci: kill pp->cmd_tbl_sg

With NCQ, there are multiple sg tables, so pp->cmd_tbl_sg doesn't cut
it.  Directly calculate sg table address from pp->cmd_tbl.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] ahci: add HOST_CAP_NCQ constant
Tejun Heo [Mon, 15 May 2006 12:03:52 +0000 (21:03 +0900)] 
[PATCH] ahci: add HOST_CAP_NCQ constant

Add HOST_CAP_NCQ.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] ahci: clean up AHCI constants in preparation for NCQ
Tejun Heo [Mon, 15 May 2006 12:03:50 +0000 (21:03 +0900)] 
[PATCH] ahci: clean up AHCI constants in preparation for NCQ

* Rename CMD_TBL_HDR to CMD_TBL_HDR_SZ as it's size not offset.

* Define MAX_CMDS and CMD_SZ and use them in calculation of other
  constants.

* Define CMD_TBL_AR_SZ as product of CMD_TBL_SZ and MAX_CMDS, and use
  it when calculating PRIV_DMA_SZ.

* CMD_SLOT_SZ is also dependent on MAX_CMDS but hasn't been changed
  because I didn't want to change the value used by the original code
  (32 commands).  Later NCQ change will bump MAX_CMDS to 32 anyway and
  the hard coded 32 can be changed to MAX_CMDS then.

* Reorder HOST_CAP_* flags.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-ncq: implement NCQ device configuration
Tejun Heo [Mon, 15 May 2006 12:03:48 +0000 (21:03 +0900)] 
[PATCH] libata-ncq: implement NCQ device configuration

Now that all NCQ related stuff are in place, implement NCQ device
configuration and bump ATA_MAX_QUEUE to 32 thus activating NCQ
support.

Original implementation is from Jens Axboe.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-ncq: update EH to handle NCQ
Tejun Heo [Mon, 15 May 2006 12:03:46 +0000 (21:03 +0900)] 
[PATCH] libata-ncq: update EH to handle NCQ

Update EH to handle NCQ.  ata_eh_autopsy() is updated to call
ata_eh_analyze_ncq_error() which reads log page 10h on NCQ device
error and updates eh_context accordingly.  ata_eh_report() is updated
to report SActive.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-ncq: implement NCQ command translation and exclusion
Tejun Heo [Mon, 15 May 2006 12:03:45 +0000 (21:03 +0900)] 
[PATCH] libata-ncq: implement NCQ command translation and exclusion

This patch implements NCQ command translation and exclusion.  Note
that NCQ commands don't use ata_rwcmd_protocol() to choose ATA
command.  This is because, unlike non-NCQ RW commands, NCQ commands
can only be used for NCQ protocol and FUA handling is done with a flag
rather than separate command.

NCQ enabled device will have queue depth larger than one but no two
non-NCQ commands can be issued simultaneously, neither can a non-NCQ
command and NCQ commands.  This patch makes ata_scsi_translate()
return SCSI_MLQUEUE_DEVICE_BUSY if such exclusion is necessary.  SCSI
midlayer will retry the command later.

As SCSI midlayer always retries once a command completes, this doesn't
incur unnecessary delays and as most commands will be NCQ ones for NCQ
device, so the overhead should be negligible.

Initial implementation is from Jens Axboe and using
SCSI_MLQUEUE_DEVICE_BUSY for exclusion is suggested by Jeff Garzik.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-ncq: implement ap->qc_active, ap->sactive and complete helper
Tejun Heo [Mon, 15 May 2006 12:03:43 +0000 (21:03 +0900)] 
[PATCH] libata-ncq: implement ap->qc_active, ap->sactive and complete helper

Add ap->qc_active and ap->sactive, mask of all active qcs and libata's
view of the SActive register, respectively.  Also, implement
ata_qc_complete_multiple() which takes new qc_active mask and complete
multiple qcs according to the mask.

These will be used to track NCQ commands and complete them.  The
distinction between ap->qc_active and ap->sactive is also useful for
later PM implementation.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-ncq: rename ap->qactive to ap->qc_allocated
Tejun Heo [Mon, 15 May 2006 12:03:41 +0000 (21:03 +0900)] 
[PATCH] libata-ncq: rename ap->qactive to ap->qc_allocated

Rename ap->qactive to ap->qc_allocated.  This is to accomodate
addition of ap->qc_active, mask of active qcs.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-ncq: pass ata_scsi_translate() return value to SCSI midlayer
Tejun Heo [Mon, 15 May 2006 12:03:39 +0000 (21:03 +0900)] 
[PATCH] libata-ncq: pass ata_scsi_translate() return value to SCSI midlayer

ata_scsi_translate() will need to return SCSI_ML_QUEUE_DEVICE_BUSY to
achieve exlusion between NCQ and non-NCQ commands or among non-NCQ
commands.  Pass its return value upward to SCSI midlayer.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-ncq: add NCQ related ATA/libata constants and macros
Tejun Heo [Mon, 15 May 2006 12:03:38 +0000 (21:03 +0900)] 
[PATCH] libata-ncq: add NCQ related ATA/libata constants and macros

Add NCQ related ATA/libata constants and macros.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: fix irq-pio merge
Tejun Heo [Mon, 15 May 2006 11:59:29 +0000 (20:59 +0900)] 
[PATCH] libata: fix irq-pio merge

* kill ata_poll_qc_complete() and implement/use ata_hsm_qc_complete()
  which completes qcs in new EH compliant manner from HSM

* don't print error message from ata_hsm_move().  it's responsibility
  of EH.

* kill ATA_FLAG_NOINTR usage in bmdma EH

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years agoMerge branch 'irq-pio'
Tejun Heo [Mon, 15 May 2006 11:59:15 +0000 (20:59 +0900)] 
Merge branch 'irq-pio'

Conflicts:

drivers/scsi/libata-core.c
include/linux/libata.h

18 years ago[PATCH] sata_sil24: convert to new EH
Tejun Heo [Mon, 15 May 2006 11:58:32 +0000 (20:58 +0900)] 
[PATCH] sata_sil24: convert to new EH

Convert sata_sil24 to new EH.

* When port is frozen, IRQ for the port is masked.

* sil24_softreset() doesn't need to mangle with IRQ mask anymore.
  libata ensures that the port is frozen during reset.

* Only turn on interrupts which are handled by interrupt handler and
  EH.  As we don't handle SDB notify yet, turn it off. DEV_XCHG and
  UNK_FIS are handled by EH and thus turned on.

* sil24_softreset() usually fails to recover the port after DEV_XCHG.
  ATA_PORT_HARDRESET is used as recovery action for DEV_XCHG.

* sil24 may be invoked without any active command.  e.g. DEV_XCHG irq
  occuring while no qc in progress still triggers EH and will reset
  the port and revalidate attached device.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] ahci: add PIOS interim interrupt handling
Tejun Heo [Mon, 15 May 2006 11:58:30 +0000 (20:58 +0900)] 
[PATCH] ahci: add PIOS interim interrupt handling

During multiblock PIO, multiple PIOS interrupts are generated before
qc compltion.  Current code prints unnecessary message for such cases.
This is exposed when new EH slows down attached device into PIO mode.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] ahci: convert to new EH
Tejun Heo [Mon, 15 May 2006 11:58:29 +0000 (20:58 +0900)] 
[PATCH] ahci: convert to new EH

Convert AHCI to new EH.  Unfortunately, ICH7 AHCI reacts badly if IRQ
mask is diddled during operation.  So, freezing is implemented by
unconditionally clearing interrupt conditions while frozen.

* Interrupts are categorized according to required action.
  e.g. Connection status or unknown FIS error requires freezing the
  port while TF or HBUS_DATA don't.

* Only CONNECT (reflects SErr.X) interrupt is taken into account not
  PHYRDY (SErr.N), as CONNECT is better cue for starting EH.

* AHCI may be invoked without any active command.  e.g. CONNECT irq
  occuring while no qc in progress still triggers EH and will reset
  the port and revalidate attached device.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] sata_sil: convert to new EH
Tejun Heo [Mon, 15 May 2006 11:58:27 +0000 (20:58 +0900)] 
[PATCH] sata_sil: convert to new EH

Convert sata_sil to new EH.  As these controllers have hardware
interrupt mask and are known to have screaming interrupts issues, use
hardware IRQ masking for freezing.  sil_freeze() masks interrupts for
the port and sil_thaw() unmasks them.  As ports are automatically
frozen before probing reset, there is no need to initialize interrupt
masks sil_init_onde().  Remove related code.

Other than freezing, sata_sil uses stock BMDMA EH routines.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] ata_piix: convert to new EH
Tejun Heo [Mon, 15 May 2006 11:58:25 +0000 (20:58 +0900)] 
[PATCH] ata_piix: convert to new EH

ata_piix can use stock BMDMA EH routines.  Convert to new EH.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh: implement BMDMA EH
Tejun Heo [Mon, 15 May 2006 11:58:24 +0000 (20:58 +0900)] 
[PATCH] libata-eh: implement BMDMA EH

Implement stock BMDMA error handling methods.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh: implement new EH
Tejun Heo [Mon, 15 May 2006 11:58:22 +0000 (20:58 +0900)] 
[PATCH] libata-eh: implement new EH

Implement new EH.  The exported interface is ata_do_eh() which is to
be called from ->error_handler and performs the following steps to
recover the failed port.

ata_eh_autopsy() : analyze SError/TF, determine the cause of failure
   and required recovery actions and record it in
   ap->eh_context
ata_eh_report()  : report the failure to user
ata_eh_recover() : perform recovery actions described in ap->eh_context
ata_eh_finish()  : finish failed qcs

LLDDs can customize error handling by modifying eh_context before
calling ata_do_eh() or, if necessary, doing so inbetween each major
steps by calling each step explicitly.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh: implement ata_eh_info and ata_eh_context
Tejun Heo [Mon, 15 May 2006 11:58:21 +0000 (20:58 +0900)] 
[PATCH] libata-eh: implement ata_eh_info and ata_eh_context

struct ata_eh_info serves as the communication channel between
execution path and EH.  Execution path describes detected error
condition in ap->eh_info and EH recovers the port using it.  To avoid
missing error conditions detected during EH, EH makes its own copy of
eh_info and clears it on entry allowing error info to accumulate
during EH.

Most EH states including EH's copy of eh_info are stored in
ap->eh_context (struct ata_eh_context) which is owned by EH and thus
doesn't require any synchronization to access and alter.  This
standardized context makes it easy to integrate various parts of EH
and extend EH to handle multiple links (for PM).

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh: implement dev->ering
Tejun Heo [Mon, 15 May 2006 11:58:19 +0000 (20:58 +0900)] 
[PATCH] libata-eh: implement dev->ering

This patch implements ata_ering and uses it to define dev->ering.

ata_ering is a ring buffer which records libata errors - whether a
command was for normar IO request, err_mask and timestamp.  Errors are
recorded per-device in dev->ering.  This will be used by EH to
determine recovery actions.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh: add ATA and libata flags for new EH
Tejun Heo [Mon, 15 May 2006 11:58:17 +0000 (20:58 +0900)] 
[PATCH] libata-eh: add ATA and libata flags for new EH

Add ATA and libata flags to be used by new EH.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh-fw: update SCSI command completion path for new EH
Tejun Heo [Mon, 15 May 2006 11:58:16 +0000 (20:58 +0900)] 
[PATCH] libata-eh-fw: update SCSI command completion path for new EH

SCSI command completion path used to do some part of EH including
printing messages and obtaining sense data.  With new EH, all these
are responsibilities of the EH, update SCSI command completion path to
reflect this.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh-fw: update ata_exec_internal() for new EH
Tejun Heo [Mon, 15 May 2006 11:58:14 +0000 (20:58 +0900)] 
[PATCH] libata-eh-fw: update ata_exec_internal() for new EH

Update ata_exec_internal() such that it uses new EH framework.
->post_internal_cmd() is always invoked regardless of completion
status.  Also, when ata_exec_internal() detects a timeout condition
and new EH is in place, it freezes the port as timeout for normal
commands would do.

Note that ata_port_flush_task() is called regardless of
wait_for_completion status.  This is necessary as exceptions unrelated
to the qc can abort the qc, in which case PIO task could still be
running after the wait for completion returns.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh-fw: update ata_scsi_error() for new EH
Tejun Heo [Mon, 15 May 2006 11:58:12 +0000 (20:58 +0900)] 
[PATCH] libata-eh-fw: update ata_scsi_error() for new EH

Update ata_scsi_error() for new EH.  ata_scsi_error() is responsible
for claiming timed out qcs and invoking ->error_handler in safe and
synchronized manner.  As the state of the controller is unknown if a
qc has timed out, the port is frozen in such cases.

Note that ata_scsi_timed_out() isn't used for new EH.  This is because
a timed out qc cannot be claimed by EH without freezing the port and
freezing the port in ata_scsi_timed_out() results in unnecessary
abortion of other active qcs.  ata_scsi_timed_out() can be removed
once all drivers are converted to new EH.

While at it, add 'TODO: kill' comments to old EH functions.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh-fw: implement new EH scheduling from PIO
Tejun Heo [Mon, 15 May 2006 11:58:11 +0000 (20:58 +0900)] 
[PATCH] libata-eh-fw: implement new EH scheduling from PIO

PIO executes without holding host_set lock, so it cannot be
synchronized using the same mechanism as interrupt driven execution.
port_task framework makes sure that EH is not entered until PIO task
is flushed, so PIO task can be sure the qc in progress won't go away
underneath it.  One thing it cannot be sure of is whether the qc has
already been scheduled for EH by another exception condition while
host_set lock was released.

This patch makes ata_poll_qc-complete() handle such conditions
properly and make it freeze the port if HSM violation is detected
during PIO execution.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh-fw: implement freeze/thaw
Tejun Heo [Mon, 15 May 2006 11:58:09 +0000 (20:58 +0900)] 
[PATCH] libata-eh-fw: implement freeze/thaw

Freezing is performed atomic w.r.t. host_set->lock and once frozen
LLDD is not allowed to access the port or any qc on it.  Also, libata
makes sure that no new qc gets issued to a frozen port.

A frozen port is thawed after a reset operation completes
successfully, so reset methods must do its job while the port is
frozen.  During initialization all ports get frozen before requesting
IRQ, so reset methods are always invoked on a frozen port.

Optional ->freeze and ->thaw operations notify LLDD that the port is
being frozen and thawed, respectively.  LLDD can disable/enable
hardware interrupt in these callbacks if the controller's IRQ mask can
be changed dynamically.  If the controller doesn't allow such
operation, LLDD can check for frozen state in the interrupt handler
and ack/clear interrupts unconditionally while frozen.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh-fw: implement ata_port_schedule_eh() and ata_port_abort()
Tejun Heo [Mon, 15 May 2006 11:58:07 +0000 (20:58 +0900)] 
[PATCH] libata-eh-fw: implement ata_port_schedule_eh() and ata_port_abort()

ata_port_schedule_eh() directly schedules EH for @ap without
associated qc.  Once EH scheduled, no further qc is allowed and EH
kicks in as soon as all currently active qc's are drained.

ata_port_abort() schedules all currently active commands for EH by
qc_completing them with ATA_QCFLAG_FAILED set.  If ata_port_abort()
doesn't find any qc to abort, it directly schedule EH using
ata_port_schedule_eh().

These two functions provide ways to invoke EH for conditions which
aren't directly related to any specfic qc.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh-fw: implement new EH scheduling via error completion
Tejun Heo [Mon, 15 May 2006 11:58:05 +0000 (20:58 +0900)] 
[PATCH] libata-eh-fw: implement new EH scheduling via error completion

There are several ways a qc can get schedule for EH in new EH.  This
patch implements one of them - completing a qc with ATA_QCFLAG_FAILED
set or with non-zero qc->err_mask.  ALL such qc's are examined by EH.

New EH schedules a qc for EH from completion iff ->error_handler is
implemented, qc is marked as failed or qc->err_mask is non-zero and
the command is not an internal command (internal cmd is handled via
->post_internal_cmd).  The EH scheduling itself is performed by asking
SCSI midlayer to schedule EH for the specified scmd.

For drivers implementing old-EH, nothing changes.  As this change
makes ata_qc_complete() rather large, it's not inlined anymore and
__ata_qc_complete() is exported to other parts of libata for later
use.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh-fw: update ata_qc_from_tag() to enforce normal/EH qc ownership
Tejun Heo [Mon, 15 May 2006 11:58:03 +0000 (20:58 +0900)] 
[PATCH] libata-eh-fw: update ata_qc_from_tag() to enforce normal/EH qc ownership

New EH framework has clear distinction about who owns a qc.  Every qc
starts owned by normal execution path - PIO, interrupt or whatever.
When an exception condition occurs which affects the qc, the qc gets
scheduled for EH.  Note that some events (say, link lost and regained,
command timeout) may schedule qc's which are not directly related but
could have been affected for EH too.  Scheduling for EH is atomic
w.r.t. ap->host_set->lock and once schedule for EH, normal execution
path is not allowed to access the qc in whatever way.  (PIO
synchronization acts a bit different and will be dealt with later)

This patch make ata_qc_from_tag() check whether a qc is active and
owned by normal path before returning it.  If conditions don't match,
NULL is returned and thus access to the qc is denied.
__ata_qc_from_tag() is the original ata_qc_from_tag() and is used by
libata core/EH layers to access inactive/failed qc's.

This change is applied only if the associated LLDD implements new EH
as indicated by non-NULL ->error_handler

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh-fw: use special reserved tag and qc for internal commands
Tejun Heo [Mon, 15 May 2006 11:58:02 +0000 (20:58 +0900)] 
[PATCH] libata-eh-fw: use special reserved tag and qc for internal commands

New EH may issue internal commands to recover from error while failed
qc's are still hanging around.  To allow such usage, reserve tag
ATA_MAX_QUEUE-1 for internal command.  This also makes it easy to tell
whether a qc is for internal command or not.  ata_tag_internal() test
implements this test.

To avoid breaking existing drivers, ata_exec_internal() uses
ATA_TAG_INTERNAL only for drivers which implement ->error_handler.
For drivers using old EH, tag 0 is used.  Note that this makes
ata_tag_internal() test valid only when ->error_handler is
implemented.  This is okay as drivers on old EH should not and does
not have any reason to use ata_tag_internal().

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh-fw: clear SError in ata_std_postreset()
Tejun Heo [Mon, 15 May 2006 11:58:00 +0000 (20:58 +0900)] 
[PATCH] libata-eh-fw: clear SError in ata_std_postreset()

Clear SError in ata_std_postreset().  This is to clear SError bits
which get set during reset.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata-eh-fw: add flags and operations for new EH
Tejun Heo [Mon, 15 May 2006 11:57:58 +0000 (20:57 +0900)] 
[PATCH] libata-eh-fw: add flags and operations for new EH

Add ATA_FLAG_EH_{PENDING|FROZEN}, ATA_ATA_QCFLAG_{FAILED|SENSE_VALID}
and ops->freeze, thaw, error_handler, post_internal_cmd() for new EH.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: use ATA printk helpers
Tejun Heo [Mon, 15 May 2006 11:57:56 +0000 (20:57 +0900)] 
[PATCH] libata: use ATA printk helpers

Use ATA printk helpers.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: implement ATA printk helpers
Tejun Heo [Mon, 15 May 2006 11:57:55 +0000 (20:57 +0900)] 
[PATCH] libata: implement ATA printk helpers

Implement ata_{port|dev}_printk() which prefixes the message with
proper identification string.  This change is necessary for later PM
support because devices and links should be identified differently
depending on how they are attached.

This also helps unifying device id strings.  Currently, there are two
forms in use (P is the port number D device number) - 'ataP(D):', and
'ataP: dev D '.  These macros also make it harder to forget proper ID
string (e.g. printing only port number when a device is in question).

Debug message handling can be integrated into these printk macros by
passing debug type and level via @lv.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: use dev->ap
Tejun Heo [Mon, 15 May 2006 11:57:53 +0000 (20:57 +0900)] 
[PATCH] libata: use dev->ap

Use dev->ap where possible and eliminate superflous @ap from functions
and structures.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: add dev->ap
Tejun Heo [Mon, 15 May 2006 11:57:51 +0000 (20:57 +0900)] 
[PATCH] libata: add dev->ap

Add dev->ap which points back to the port the device belongs to.  This
makes it unnecessary to pass @ap for silly reasons (e.g. printks).
Also, this change is necessary to accomodate later PM support which
will introduce ATA link inbetween port and device.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: kill old SCR functions and sata_dev_present()
Tejun Heo [Mon, 15 May 2006 11:57:49 +0000 (20:57 +0900)] 
[PATCH] libata: kill old SCR functions and sata_dev_present()

Kill now unused scr_{read|write|write_flush}() and sata_dev_present().

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: use new SCR and on/offline functions
Tejun Heo [Mon, 15 May 2006 11:57:47 +0000 (20:57 +0900)] 
[PATCH] libata: use new SCR and on/offline functions

Use new SCR and on/offline functions.  Note that for LLDD which know
it implements SCR callbacks, SCR functions are guaranteed to succeed
and ata_port_online() == !ata_port_offline().

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: implement new SCR handling and port on/offline functions
Tejun Heo [Mon, 15 May 2006 11:57:46 +0000 (20:57 +0900)] 
[PATCH] libata: implement new SCR handling and port on/offline functions

Implement ata_scr_{valid|read|write|write_flush}() and
ata_port_{online|offline}().  These functions replace
scr_{read|write}() and sata_dev_present().

Major difference between between the new SCR functions and the old
ones is that the new ones have a way to signal error to the caller.
This makes handling SCR-available and SCR-unavailable cases in the
same path easier.  Also, it eases later PM implementation where SCR
access can fail due to various reasons.

ata_port_{online|offline}() functions return 1 only when they are
affirmitive of the condition.  e.g.  if SCR is unaccessible or
presence cannot be determined for other reasons, these functions
return 0.  So, ata_port_online() != !ata_port_offline().  This
distinction is useful in many exception handling cases.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: init ap->cbl to ATA_CBL_SATA early
Tejun Heo [Mon, 15 May 2006 11:57:44 +0000 (20:57 +0900)] 
[PATCH] libata: init ap->cbl to ATA_CBL_SATA early

Init ap->cbl to ATA_CBL_SATA in ata_host_init().  This is necessary
for soon-to-follow SCR handling function changes.  LLDDs are free to
change ap->cbl during probing.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] sata_sil24: update TF image only when necessary
Tejun Heo [Mon, 15 May 2006 11:57:42 +0000 (20:57 +0900)] 
[PATCH] sata_sil24: update TF image only when necessary

Update TF image (pp->tf) only when necessary.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: implement qc->result_tf
Tejun Heo [Mon, 15 May 2006 11:57:40 +0000 (20:57 +0900)] 
[PATCH] libata: implement qc->result_tf

Add qc->result_tf and ATA_QCFLAG_RESULT_TF.  This moves the
responsibility of loading result TF from post-compltion path to qc
execution path.  qc->result_tf is loaded if explicitly requested or
the qc failsa.  This allows more efficient completion implementation
and correct handling of result TF for controllers which don't have
global TF representation such as sil3124/32.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: remove postreset handling from ata_do_reset()
Tejun Heo [Mon, 15 May 2006 11:57:38 +0000 (20:57 +0900)] 
[PATCH] libata: remove postreset handling from ata_do_reset()

Make ata_do_reset() deal only with reset.  postreset is now the
responsibility of the caller.  This is simpler and eases later
prereset addition.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: move ->set_mode() handling into ata_set_mode()
Tejun Heo [Mon, 15 May 2006 11:57:37 +0000 (20:57 +0900)] 
[PATCH] libata: move ->set_mode() handling into ata_set_mode()

Move ->set_mode() handlng into ata_set_mode().

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: use preallocated buffers
Tejun Heo [Mon, 15 May 2006 11:57:35 +0000 (20:57 +0900)] 
[PATCH] libata: use preallocated buffers

It's not a very good idea to allocate memory during EH.  Use
statically allocated buffer for dev->id[] and add 512byte buffer
ap->sector_buf.  This buffer is owned by EH (or probing) and to be
used as temporary buffer for various purposes (IDENTIFY, NCQ log page
10h, PM GSCR block).

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: hold host_set lock while finishing internal qc
Tejun Heo [Mon, 15 May 2006 11:57:33 +0000 (20:57 +0900)] 
[PATCH] libata: hold host_set lock while finishing internal qc

Hold host_set lock while finishing internal qc.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: clear ap->active_tag atomically w.r.t. command completion
Tejun Heo [Mon, 15 May 2006 11:57:32 +0000 (20:57 +0900)] 
[PATCH] libata: clear ap->active_tag atomically w.r.t. command completion

ap->active_tag was cleared in ata_qc_free().  This left ap->active_tag
dangling after ata_qc_complete().  Spurious interrupts inbetween could
incorrectly access the qc.  Clear active_tag in ata_qc_complete().
This change is necessary for later EH changes.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: fix ->phy_reset class code handling in ata_bus_probe()
Tejun Heo [Mon, 15 May 2006 11:57:30 +0000 (20:57 +0900)] 
[PATCH] libata: fix ->phy_reset class code handling in ata_bus_probe()

ata_bus_probe() doesn't clear dev->class after ->phy_reset().  This
can result in falsely enabled devices if probing fails.  Clear
dev->class to ATA_DEV_UNKNOWN after fetching it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: kill duplicate prototypes
Tejun Heo [Mon, 15 May 2006 11:57:28 +0000 (20:57 +0900)] 
[PATCH] libata: kill duplicate prototypes

Kill duplicate prototypes for ata_eh_qc_complete/retry() in libata.h.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: unexport ata_scsi_error()
Tejun Heo [Mon, 15 May 2006 11:57:27 +0000 (20:57 +0900)] 
[PATCH] libata: unexport ata_scsi_error()

While moving ata_scsi_error() from LLDD sht to libata transportt,
EXPORT_SYMBOL_GPL() entry was left out.  Kill it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] ahci: hardreset classification fix
Tejun Heo [Mon, 15 May 2006 11:57:25 +0000 (20:57 +0900)] 
[PATCH] ahci: hardreset classification fix

AHCI calls ata_dev_classify() even when no device is attached which
results in false class code.  Fix it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: rename ata_down_sata_spd_limit() and friends
Tejun Heo [Mon, 15 May 2006 11:57:23 +0000 (20:57 +0900)] 
[PATCH] libata: rename ata_down_sata_spd_limit() and friends

Rename ata_down_sata_spd_limit() and friends to sata_down_spd_limit()
and likewise for simplicity & consistency.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] libata: silly fix in ata_scsi_start_stop_xlat()
Tejun Heo [Mon, 15 May 2006 11:57:21 +0000 (20:57 +0900)] 
[PATCH] libata: silly fix in ata_scsi_start_stop_xlat()

Don't directly access &qc->tf when tf == &qc->tf.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] SCSI: implement shost->host_eh_scheduled
Tejun Heo [Mon, 15 May 2006 11:57:20 +0000 (20:57 +0900)] 
[PATCH] SCSI: implement shost->host_eh_scheduled

libata needs to invoke EH without scmd.  This patch adds
shost->host_eh_scheduled to implement such behavior.

Currently the only user of this feature is libata and no general
interface is defined.  This patch simply adds handling for
host_eh_scheduled where needed and exports scsi_eh_wakeup() to
modules.  The rest is upto libata.  This is the result of the
following discussion.

http://thread.gmane.org/gmane.linux.scsi/23853/focus=9760

In short, SCSI host is not supposed to know about exceptions unrelated
to specific device or command.  Such exceptions should be handled by
transport layer proper.  However, the distinction is not essential to
ATA and libata is planning to depart from SCSI, so, for the time
being, libata will be using SCSI EH to handle such exceptions.

Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years ago[PATCH] SCSI: Introduce scsi_req_abort_cmd (REPOST)
Luben Tuikov [Mon, 15 May 2006 11:57:18 +0000 (20:57 +0900)] 
[PATCH] SCSI: Introduce scsi_req_abort_cmd (REPOST)

Introduce scsi_req_abort_cmd(struct scsi_cmnd *).
This function requests that SCSI Core start recovery for the
command by deleting the timer and adding the command to the eh
queue.  It can be called by either LLDDs or SCSI Core.  LLDDs who
implement their own error recovery MAY ignore the timeout event if
they generated scsi_req_abort_cmd.

First post:
http://marc.theaimsgroup.com/?l=linux-scsi&m=113833937421677&w=2

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
18 years agoRevert "[PATCH] i386: export: memory more than 4G through /proc/iomem"
Linus Torvalds [Sat, 13 May 2006 15:01:23 +0000 (08:01 -0700)] 
Revert "[PATCH] i386: export: memory more than 4G through /proc/iomem"

This reverts commit 10dbe196a8da6b3196881269c6639c0ec11c36cb.

The resource struct is still 32-bit, so trying to save a 64-bit memory
size there obviously won't work.

When we merge the 64-bit resource series, we can re-enable this.

Thanks to Sachin Sant and Maneesh Soni for debugging

Cc: Maneesh Soni <maneesh@in.ibm.com>
Cc: Sachin Sant <sachinp@in.ibm.com>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Sharyathi Nagesh <sharyath@in.ibm.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoAlternative fix for MMC oops on unmount after removal
Linus Torvalds [Sat, 13 May 2006 01:42:09 +0000 (18:42 -0700)] 
Alternative fix for MMC oops on unmount after removal

Make sure to clear the driverfs_dev pointer when we do del_gendisk() (on
disk removal), so that other users that may still have a ref to the disk
won't try to use the stale pointer.

Also move the KOBJ_REMOVE uevent handler up, so that the uevent still
has access to the driverfs_dev data.

This all should hopefully fix the problems with MMC umounts after device
removals that caused commit 56cf6504fc1c0c221b82cebc16a444b684140fb7 and
its reversal (1a2acc9e9214699a99389e323e6686e9e0e2ca67).

Original problem reported by Todd Blumer and others.

Acked-by: Greg KH <gregkh@suse.de>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Erik Mouw <erik@harddisk-recovery.com>
Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: Todd Blumer <todd@sdgsystems.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 12 May 2006 22:39:32 +0000 (15:39 -0700)] 
Merge /pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NEIGH]: Fix IP-over-ATM and ARP interaction.
  [TG3]: ethtool always report port is TP.

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Fri, 12 May 2006 22:26:29 +0000 (15:26 -0700)] 
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC]: Fix warning on prom_getproperty in openprom.c
  [SPARC]: Handle UNWIND_INFO properly.
  [SPARC64]: Update defconfig.
  [SPARC]: show device name in /proc/dvma_map
  [SPARC]: Remove duplicate symbol exports

18 years agoIB: refcount race fixes
Sean Hefty [Fri, 12 May 2006 21:57:52 +0000 (14:57 -0700)] 
IB: refcount race fixes

Fix race condition during destruction calls to avoid possibility of
accessing object after it has been freed.  Instead of waking up a wait
queue directly, which is susceptible to a race where the object is
freed between the reference count going to 0 and the wake_up(), use a
completion to wait in the function doing the freeing.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/ipath: Properly terminate PCI ID table
Roland Dreier [Fri, 12 May 2006 21:57:52 +0000 (14:57 -0700)] 
IB/ipath: Properly terminate PCI ID table

The ipath driver's table of PCI IDs needs a { 0, } entry at the end.
This makes all of the device aliases visible to userspace so hotplug
loads the module for all supported devices.  Without the patch,
modinfo ipath_core only shows:

    alias:          pci:v00001FC1d0000000Dsv*sd*bc*sc*i*

instead of the correct:

    alias:          pci:v00001FC1d00000010sv*sd*bc*sc*i*
    alias:          pci:v00001FC1d0000000Dsv*sd*bc*sc*i*

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
18 years ago[NEIGH]: Fix IP-over-ATM and ARP interaction.
Simon Kelley [Fri, 12 May 2006 21:56:08 +0000 (14:56 -0700)] 
[NEIGH]: Fix IP-over-ATM and ARP interaction.

The classical IP over ATM code maintains its own IPv4 <-> <ATM stuff>
ARP table, using the standard neighbour-table code. The
neigh_table_init function adds this neighbour table to a linked list
of all neighbor tables which is used by the functions neigh_delete()
neigh_add() and neightbl_set(), all called by the netlink code.

Once the ATM neighbour table is added to the list, there are two
tables with family == AF_INET there, and ARP entries sent via netlink
go into the first table with matching family. This is indeterminate
and often wrong.

To see the bug, on a kernel with CLIP enabled, create a standard IPv4
ARP entry by pinging an unused address on a local subnet. Then attempt
to complete that entry by doing

ip neigh replace <ip address> lladdr <some mac address> nud reachable

Looking at the ARP tables by using

ip neigh show

will reveal two ARP entries for the same address. One of these can be
found in /proc/net/arp, and the other in /proc/net/atm/arp.

This patch adds a new function, neigh_table_init_no_netlink() which
does everything the neigh_table_init() does, except add the table to
the netlink all-arp-tables chain. In addition neigh_table_init() has a
check that all tables on the chain have a distinct address family.
The init call in clip.c is changed to call
neigh_table_init_no_netlink().

Since ATM ARP tables are rather more complicated than can currently be
handled by the available rtattrs in the netlink protocol, no
functionality is lost by this patch, and non-ATM ARP manipulation via
netlink is rescued. A more complete solution would involve a rtattr
for ATM ARP entries and some way for the netlink code to give
neigh_add and friends more information than just address family with
which to find the correct ARP table.

[ I've changed the assertion checking in neigh_table_init() to not
  use BUG_ON() while holding neigh_tbl_lock.  Instead we remember that
  we found an existing tbl with the same family, and after dropping
  the lock we'll give a diagnostic kernel log message and a stack dump.
  -DaveM ]

Signed-off-by: Simon Kelley <simon@thekelleys.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC]: Fix warning on prom_getproperty in openprom.c
Martin Habets [Fri, 12 May 2006 19:53:59 +0000 (12:53 -0700)] 
[SPARC]: Fix warning on prom_getproperty in openprom.c

Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: ethtool always report port is TP.
Karsten Keil [Fri, 12 May 2006 19:49:08 +0000 (12:49 -0700)] 
[TG3]: ethtool always report port is TP.

Even with fiber cards ethtool reports that the connected port is TP,
the patch fix this.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC]: Handle UNWIND_INFO properly.
David S. Miller [Fri, 12 May 2006 19:45:50 +0000 (12:45 -0700)] 
[SPARC]: Handle UNWIND_INFO properly.

For sparc32 we need R_SPARC_UA32 relocation support, for
sparc64 we need the handle R_SPARC_DISP32 relocations.

Based upon reports and initial patch by Martin Habets.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Linus Torvalds [Fri, 12 May 2006 19:14:52 +0000 (12:14 -0700)] 
Merge /pub/scm/linux/kernel/git/gregkh/i2c-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6:
  [PATCH] scx200_acb: Fix for the CS5535 errata
  [PATCH] scx200_acb: Fix resource name use after free
  [PATCH] scx200_acb: Fix return on init error

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Fri, 12 May 2006 19:14:19 +0000 (12:14 -0700)] 
Merge /pub/scm/linux/kernel/git/gregkh/usb-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  [PATCH] USB: fix omninet driver bug
  [PATCH] USB: add ark3116 usb to serial driver
  [PATCH] usbserial: Fixes leak in serial_open() error path.
  [PATCH] usbserial: Fixes use-after-free in serial_open().
  [PATCH] USB: Emagic USB firmware loading fixes
  [PATCH] USB: add an IBM USB keyboard to the HID_QUIRK_NOGET blacklist
  [PATCH] USB: Add Sieraa Wireless 580 evdo card to airprime.c
  [PATCH] USB: ftdi_sio: add device id for ACT Solutions HomePro ZWave interface
  [PATCH] USB: ftdi_sio: Add support for HCG HF Dual ISO RFID Reader
  [PATCH] USB: ub oops in block_uevent
  [PATCH] USB: usbcore: don't check the device's power source
  [PATCH] USB: fix OHCI PM regression
  [PATCH] USB: pegasus fixes (logstorm, suspend)
  [PATCH] USBATM: fix modinfo output
  [PATCH] USBATM: change the default speedtouch iso altsetting
  [PATCH] USB: fix bug in ohci-hcd.c ohci_restart()

18 years agoRevert "[BLOCK] Fix oops on removal of SD/MMC card"
Linus Torvalds [Fri, 12 May 2006 19:08:46 +0000 (12:08 -0700)] 
Revert "[BLOCK] Fix oops on removal of SD/MMC card"

This reverts commit 56cf6504fc1c0c221b82cebc16a444b684140fb7.

Both Erik Mouw and Andrew Vasquez independently pinpointed this commit
as causing problems, where the slab cache for a driver is never released
(most obviously causing problems when immediately re-loading that
driver, resulting in a "kmem_cache_create: duplicate cache <xyz>"
message, but it can also cause other trouble).

James Bottomley dug into it, and reports:

  "OK, here's the scoop.  The problem patch adds a get of driverfs_dev in
   add_disk(), but doesn't put it again until disk_release() (which occurs
   on final put_disk() of the gendisk).

   However, in SCSI, the driverfs_dev is the sdev_gendev.  That means
   there's a reference held on sdev_gendev  until final disk put.
   Unfortunately, we use the driver model driver_remove to trigger
   del_gendisk (which removes the gendisk from visibility and decrements
   the refcount), so we've introduced an unbreakable deadlock in the
   reference counting with this.

   I suggest simply reversing this patch at the moment.  If Russell and
   Jens can tell me what they're trying to do I'll see if there's another
   way to do it."

so hereby the patch gets reverted, waiting for a better fix.

Cc: Jens Axboe <axboe@suse.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Erik Mouw <erik@harddisk-recovery.com>
Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] USB: fix omninet driver bug
Greg Kroah-Hartman [Tue, 2 May 2006 06:44:45 +0000 (08:44 +0200)] 
[PATCH] USB: fix omninet driver bug

I introduced this way back in 2.6.13 when adding the port lock logic.
This device talks out through different "ports" all at the same time, so
the lock logic was wrong, preventing any data from ever being sent
properly.

Thanks a lot to Bernhard Reiter <bernhard@intevation.de> for being
patient and helping with debugging this.

Cc: Bernhard Reiter <bernhard@intevation.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: add ark3116 usb to serial driver
Greg Kroah-Hartman [Fri, 12 May 2006 18:05:29 +0000 (11:05 -0700)] 
[PATCH] USB: add ark3116 usb to serial driver

Based on Simon's original driver, with some minor code cleanups and
tidying by me.

Cc: Simon Schulz <simon@auctionant.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] usbserial: Fixes leak in serial_open() error path.
Luiz Fernando Capitulino [Fri, 12 May 2006 01:34:24 +0000 (22:34 -0300)] 
[PATCH] usbserial: Fixes leak in serial_open() error path.

If serial_open() fails at the port assignment or mutex_lock_interruptible()
is interrupted, the 'serial' object will never be freed.

We should call kref_put() when those errors happens.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] usbserial: Fixes use-after-free in serial_open().
Luiz Fernando Capitulino [Fri, 12 May 2006 01:34:17 +0000 (22:34 -0300)] 
[PATCH] usbserial: Fixes use-after-free in serial_open().

If the device is disconnected while serial_open() is executing and
either try_module_get() or the device specific open function fails, the
kref_put() call in the 'bailout_kref_put' label will free the memory
pointed out by 'port'.

The subsequent dereferences in the 'bailout_kref_put' label will be
invalid.

The fix is just to assure kref_put() is called after any 'port' usage.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: Emagic USB firmware loading fixes
Monty [Tue, 9 May 2006 19:37:22 +0000 (12:37 -0700)] 
[PATCH] USB: Emagic USB firmware loading fixes

It's become apparent as machines get faster that the emagic kernel firmware
loaders (based on the ezusb loader) have a reset race.  a 400MHz TiBook
never tripped it, but a 2GHz Pentium M seems to hit it about 30% of the
time.  The bug is seen as a hung USB box and the kernel error:

drivers/usb/misc/emi62.c: emi62_load_firmware - error loading firmware:
error = -110

The patch below inserts a delay after deasserting reset to allow the box to
settle before a new command is issued.  This affects only device startup.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: add an IBM USB keyboard to the HID_QUIRK_NOGET blacklist
Olaf Hering [Fri, 5 May 2006 09:07:21 +0000 (11:07 +0200)] 
[PATCH] USB: add an IBM USB keyboard to the HID_QUIRK_NOGET blacklist

After recent changes, the USB keyboard as shipped with IBM pSeries systems
does not work anymore, unless the keyboard is replugged after reboot.
Adding this model to the blacklist fixes it.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years ago[PATCH] USB: Add Sieraa Wireless 580 evdo card to airprime.c
Ken Brush [Tue, 9 May 2006 01:24:12 +0000 (20:24 -0500)] 
[PATCH] USB: Add Sieraa Wireless 580 evdo card to airprime.c

This adds the Sierra Wireless card to airprime.c.

I tested this on my laptop.

Signed-off-by: Ken Brush <ken@cgi101.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoLinux v2.6.17-rc4
Linus Torvalds [Thu, 11 May 2006 23:31:53 +0000 (16:31 -0700)] 
Linux v2.6.17-rc4

18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Thu, 11 May 2006 22:46:59 +0000 (15:46 -0700)] 
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 3508/1: Update collie defconfig
  [ARM] Fix thread struct allocator for SMP case
  [ARM] Update mach-types
  [ARM] Update versatile_defconfig

18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-serial
Linus Torvalds [Thu, 11 May 2006 22:46:42 +0000 (15:46 -0700)] 
Merge master.kernel.org:/home/rmk/linux-2.6-serial

* master.kernel.org:/home/rmk/linux-2.6-serial:
  [SERIAL] 8250: add locking to console write function
  [SERIAL] Remove unconditional enable of TX irq for console
  [SERIAL] 8250: set divisor register correctly for AMD Alchemy SoC uart
  [SERIAL] AMD Alchemy UART: claim memory range
  [SERIAL] Clean up serial locking when obtaining a reference to a port

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 11 May 2006 22:35:54 +0000 (15:35 -0700)] 
Merge /pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NET_SCHED]: HFSC: fix thinko in hfsc_adjust_levels()
  [IPV6]: skb leakage in inet6_csk_xmit
  [BRIDGE]: Do sysfs registration inside rtnl.
  [NET]: Do sysfs registration as part of register_netdevice.
  [TG3]: Fix possible NULL deref in tg3_run_loopback().
  [NET] linkwatch: Handle jiffies wrap-around
  [IRDA]: Switching to a workqueue for the SIR work
  [IRDA]: smsc-ircc: Minimal hotplug support.
  [IRDA]: Removing unused EXPORT_SYMBOLs
  [IRDA]: New maintainer.
  [NET]: Make netdev_chain a raw notifier.
  [IPV4]: ip_options_fragment() has no effect on fragmentation
  [NET]: Add missing operstates documentation.

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Thu, 11 May 2006 22:34:33 +0000 (15:34 -0700)] 
Merge /linux/kernel/git/jejb/scsi-rc-fixes-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (25 commits)
  [SCSI] mptfc: race between mptfc_register_dev and mptfc_target_alloc
  [SCSI] lpfc 8.1.6 : Fix Data Corruption in Bus Reset Path
  [SCSI] mptspi: revalidate negotiation parameters after host reset and resume
  [SCSI] srp.h: avoid padding of structs
  [SCSI] ibmvscsi: fix leak when failing to send srp event
  [SCSI] qla2xxx: Correct eh_abort recovery logic.
  [SCSI] megaraid_{mm,mbox}: fix a bug in reset handler
  [SCSI] fusion - bug fix stack overflow in mptbase
  [SCSI] scsi: Add IBM 2104-DU3 to blist
  [SCSI] Fix DVD burning issues.
  [SCSI] SCSI: aic7xxx_osm_pci resource leak fix.
  [SCSI] - fusion - mptfc bug fix's to prevent deadlock situations
  [SCSI] mptfusion: bug fix's for raid components adding/deleting
  [SCSI] aic7xxx: ahc_pci_write_config() fix
  [SCSI] megaraid: unused variable
  [SCSI] qla2xxx: only free_irq() after request_irq() succeeds
  [SCSI] Overrun in drivers/scsi/sim710.c
  [SCSI] lpfc 8.1.5 : Change version number to 8.1.5
  [SCSI] lpfc 8.1.5 : Misc small fixes
  [SCSI] lpfc 8.1.5 : Additional fixes to LOGO, PLOGI, and RSCN processing
  ...

18 years ago[BLOCK] limit request_fn recursion
Jens Axboe [Thu, 11 May 2006 06:20:16 +0000 (08:20 +0200)] 
[BLOCK] limit request_fn recursion

Don't recurse back into the driver even if the unplug threshold is met,
when the driver asks for a requeue. This is both silly from a logical
point of view (requeues typically happen due to driver/hardware
shortage), and also dangerous since we could hit an endless request_fn
-> requeue -> unplug -> request_fn loop and crash on stack overrun.

Also limit blk_run_queue() to one level of recursion, similar to how
blk_start_queue() works.

This patch fixed a real problem with SLES10 and lpfc, and it could hit
any SCSI lld that returns non-zero from it's ->queuecommand() handler.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[NET_SCHED]: HFSC: fix thinko in hfsc_adjust_levels()
Patrick McHardy [Thu, 11 May 2006 19:22:03 +0000 (12:22 -0700)] 
[NET_SCHED]: HFSC: fix thinko in hfsc_adjust_levels()

When deleting the last child the level of a class should drop to zero.

Noticed by Andreas Mueller <andreas@stapelspeicher.org>

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years agoptrace_attach: fix possible deadlock schenario with irqs
Linus Torvalds [Thu, 11 May 2006 18:08:49 +0000 (11:08 -0700)] 
ptrace_attach: fix possible deadlock schenario with irqs

Eric Biederman points out that we can't take the task_lock while holding
tasklist_lock for writing, because another CPU that holds the task lock
might take an interrupt that then tries to take tasklist_lock for writing.

Which would be a nasty deadlock, with one CPU spinning forever in an
interrupt handler (although admittedly you need to really work at
triggering it ;)

Since the ptrace_attach() code is special and very unusual, just make it
be extra careful, and use trylock+repeat to avoid the possible deadlock.

Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Wed, 10 May 2006 22:37:47 +0000 (15:37 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mthca: FMR ioremap fix
  IPoIB: Free child interfaces properly
  IB/mthca: Fix race in reference counting
  IB/srp: Fix tracking of pending requests during error handling
  IB: Fix display of 4-bit port counters in sysfs

18 years agoIB/mthca: FMR ioremap fix
Michael S. Tsirkin [Wed, 10 May 2006 14:58:41 +0000 (17:58 +0300)] 
IB/mthca: FMR ioremap fix

Addresses for ioremap must be calculated off of pci_resource_start;
we can't directly use the bus address as seen by the HCA.  Fix the
code that remaps device memory for FMR access.

Based on patch by Klaus Smolin.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoMerge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/shemminger...
Linus Torvalds [Wed, 10 May 2006 21:59:29 +0000 (14:59 -0700)] 
Merge branch 'upstream' of /linux/kernel/git/shemminger/netdev-2.6

* 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/shemminger/netdev-2.6:
  sis900: phy for FoxCon motherboard
  dl2k: use DMA_48BIT_MASK constant
  phy: mdiobus_register(): initialize all phy_map entries
  sky2: ifdown kills irq mask

18 years agosis900: phy for FoxCon motherboard
James Cameron [Wed, 10 May 2006 20:33:29 +0000 (13:33 -0700)] 
sis900: phy for FoxCon motherboard

661FX7MI-S motherboard which uses the SiS 661FX chipset.  The patch adds
an entry to mii_chip_info for the transceiver.

The PHY ids were found using the sis900_c_122.diff patch from
http://brownhat.org/sis900.html but that patch didn't solve the problem,
because the PHY at address 1 was already being chosen.

Without my patch, when bursts of packets arrive from other hosts on a
LAN, the interface dropped one roughly 10% of the time, causing
retransmits.  There were fifth second pauses in refresh of large xterms,
and it made Netrek suck.  I can provide further test data.

Workaround in lieu of patch is to use mii-tool to advertise
100baseTx-HD, then force renegotiation.

I wasn't able to identify the actual transceiver, so the description
field is a guess.

This patch is similar to Artur Skawina's patch:
http://marc.theaimsgroup.com/?l=linux-netdev&m=114297516729079&w=2

I'm not sure, but I wonder if it means the default behaviour should be
changed, so as to better handle future transceivers.

Diff is against 2.6.16.13.

Signed-off-by: James Cameron <james.cameron@hp.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
18 years agodl2k: use DMA_48BIT_MASK constant
Francois Romieu [Wed, 10 May 2006 19:48:57 +0000 (12:48 -0700)] 
dl2k: use DMA_48BIT_MASK constant

Typo will be harder with this one.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
18 years agophy: mdiobus_register(): initialize all phy_map entries
Herbert Valerio Riedel [Wed, 10 May 2006 16:12:57 +0000 (12:12 -0400)] 
phy: mdiobus_register(): initialize all phy_map entries

make sure phy_map entries whose PHY address is masked are initialized
to NULL, given that other code (such as mdiobus_unregister for
instance) assumes that non-NULL phy_map entries are allocated
phy_devices

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
18 years agosky2: ifdown kills irq mask
Stephen Hemminger [Tue, 9 May 2006 21:46:54 +0000 (14:46 -0700)] 
sky2: ifdown kills irq mask

Bringing down a port also masks off the status and other IRQ's
needed for device to function due to missing paren's.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
18 years ago[Cardman 40x0] Fix udev device creation
Harald Welte [Wed, 10 May 2006 11:28:52 +0000 (13:28 +0200)] 
[Cardman 40x0] Fix udev device creation

This patch corrects the order of the calls to register_chrdev() and
pcmcia_register_driver().  Now udev correctly creates userspace device
files /dev/cmmN and /dev/cmxN respectively.

Based on an earlier patch by Jan Niehusmann <jan@gondor.com>.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[IPV6]: skb leakage in inet6_csk_xmit
Alexey Kuznetsov [Wed, 10 May 2006 20:24:38 +0000 (13:24 -0700)] 
[IPV6]: skb leakage in inet6_csk_xmit

inet6_csk_xit does not free skb when routing fails.

Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[BRIDGE]: Do sysfs registration inside rtnl.
Stephen Hemminger [Wed, 10 May 2006 20:21:53 +0000 (13:21 -0700)] 
[BRIDGE]: Do sysfs registration inside rtnl.

Now that netdevice sysfs registration is done as part of
register_netdevice; bridge code no longer has to be tricky when adding
it's kobjects to bridges.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Do sysfs registration as part of register_netdevice.
Stephen Hemminger [Wed, 10 May 2006 20:21:17 +0000 (13:21 -0700)] 
[NET]: Do sysfs registration as part of register_netdevice.

The last step of netdevice registration was being done by a delayed
call, but because it was delayed, it was impossible to return any error
code if the class_device registration failed.

Side effects:
 * one state in registration process is unnecessary.
 * register_netdevice can sleep inside class_device registration/hotplug
 * code in netdev_run_todo only does unregistration so it is simpler.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This page took 0.047365 seconds and 5 git commands to generate.