Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118986
b: refs/heads/master
c: 6a6b97d
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Nov 14, 2008
1 parent 66b9c84 commit 35bbee4
Show file tree
Hide file tree
Showing 35 changed files with 159 additions and 263 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8141c7f3e7aee618312fa1c15109e1219de784a7
refs/heads/master: 6a6b97d360702b98c02c7fca4c4e088dcf3a2985
13 changes: 11 additions & 2 deletions trunk/drivers/ata/libata-sff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,10 +1227,19 @@ int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
/* ATA PIO protocol */
if (unlikely((status & ATA_DRQ) == 0)) {
/* handle BSY=0, DRQ=0 as error */
if (likely(status & (ATA_ERR | ATA_DF)))
if (likely(status & (ATA_ERR | ATA_DF))) {
/* device stops HSM for abort/error */
qc->err_mask |= AC_ERR_DEV;
else {

/* If diagnostic failed and this is
* IDENTIFY, it's likely a phantom
* device. Mark hint.
*/
if (qc->dev->horkage &
ATA_HORKAGE_DIAGNOSTIC)
qc->err_mask |=
AC_ERR_NODEV_HINT;
} else {
/* HSM violation. Let EH handle this.
* Phantom devices also trigger this
* condition. Mark hint.
Expand Down
20 changes: 2 additions & 18 deletions trunk/drivers/block/ub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1546,6 +1546,8 @@ static void ub_top_sense_done(struct ub_dev *sc, struct ub_scsi_cmd *scmd)

/*
* Reset management
* XXX Move usb_reset_device to khubd. Hogging kevent is not a good thing.
* XXX Make usb_sync_reset asynchronous.
*/

static void ub_reset_enter(struct ub_dev *sc, int try)
Expand Down Expand Up @@ -1630,22 +1632,6 @@ static void ub_reset_task(struct work_struct *work)
spin_unlock_irqrestore(sc->lock, flags);
}

/*
* XXX Reset brackets are too much hassle to implement, so just stub them
* in order to prevent forced unbinding (which deadlocks solid when our
* ->disconnect method waits for the reset to complete and this kills keventd).
*
* XXX Tell Alan to move usb_unlock_device inside of usb_reset_device,
* or else the post_reset is invoked, and restats I/O on a locked device.
*/
static int ub_pre_reset(struct usb_interface *iface) {
return 0;
}

static int ub_post_reset(struct usb_interface *iface) {
return 0;
}

/*
* This is called from a process context.
*/
Expand Down Expand Up @@ -2460,8 +2446,6 @@ static struct usb_driver ub_driver = {
.probe = ub_probe,
.disconnect = ub_disconnect,
.id_table = ub_usb_ids,
.pre_reset = ub_pre_reset,
.post_reset = ub_post_reset,
};

static int __init ub_init(void)
Expand Down
8 changes: 2 additions & 6 deletions trunk/drivers/md/dm-mpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,13 @@ static void process_queued_ios(struct work_struct *work)
__choose_pgpath(m);

pgpath = m->current_pgpath;
m->pgpath_to_activate = m->current_pgpath;

if ((pgpath && !m->queue_io) ||
(!pgpath && !m->queue_if_no_path))
must_queue = 0;

if (m->pg_init_required && !m->pg_init_in_progress && pgpath) {
m->pgpath_to_activate = pgpath;
if (m->pg_init_required && !m->pg_init_in_progress) {
m->pg_init_count++;
m->pg_init_required = 0;
m->pg_init_in_progress = 1;
Expand Down Expand Up @@ -708,10 +708,6 @@ static int parse_hw_handler(struct arg_set *as, struct multipath *m)
m->hw_handler_name = NULL;
return -EINVAL;
}

if (hw_argc > 1)
DMWARN("Ignoring user-specified arguments for "
"hardware handler \"%s\"", m->hw_handler_name);
consume(as, hw_argc - 1);

return 0;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/md/dm-raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,6 @@ static void mirror_dtr(struct dm_target *ti)

del_timer_sync(&ms->timer);
flush_workqueue(ms->kmirrord_wq);
flush_scheduled_work();
dm_kcopyd_client_destroy(ms->kcopyd_client);
destroy_workqueue(ms->kmirrord_wq);
free_context(ms, ti, ms->nr_mirrors);
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/md/dm-stripe.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,8 @@ int __init dm_stripe_init(void)
int r;

r = dm_register_target(&stripe_target);
if (r < 0) {
if (r < 0)
DMWARN("target registration failed");
return r;
}

kstriped = create_singlethread_workqueue("kstriped");
if (!kstriped) {
Expand Down
34 changes: 13 additions & 21 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ static void start_io_acct(struct dm_io *io)
dm_disk(md)->part0.in_flight = atomic_inc_return(&md->pending);
}

static void end_io_acct(struct dm_io *io)
static int end_io_acct(struct dm_io *io)
{
struct mapped_device *md = io->md;
struct bio *bio = io->bio;
Expand All @@ -391,9 +391,7 @@ static void end_io_acct(struct dm_io *io)
dm_disk(md)->part0.in_flight = pending =
atomic_dec_return(&md->pending);

/* nudge anyone waiting on suspend queue */
if (!pending)
wake_up(&md->wait);
return !pending;
}

/*
Expand Down Expand Up @@ -501,7 +499,9 @@ static void dec_pending(struct dm_io *io, int error)
spin_unlock_irqrestore(&io->md->pushback_lock, flags);
}

end_io_acct(io);
if (end_io_acct(io))
/* nudge anyone waiting on suspend queue */
wake_up(&io->md->wait);

if (io->error != DM_ENDIO_REQUEUE) {
blk_add_trace_bio(io->md->queue, io->bio,
Expand Down Expand Up @@ -937,24 +937,16 @@ static void dm_unplug_all(struct request_queue *q)

static int dm_any_congested(void *congested_data, int bdi_bits)
{
int r = bdi_bits;
struct mapped_device *md = congested_data;
struct dm_table *map;

atomic_inc(&md->pending);

if (!test_bit(DMF_BLOCK_IO, &md->flags)) {
map = dm_get_table(md);
if (map) {
r = dm_table_any_congested(map, bdi_bits);
dm_table_put(map);
}
}
int r;
struct mapped_device *md = (struct mapped_device *) congested_data;
struct dm_table *map = dm_get_table(md);

if (!atomic_dec_return(&md->pending))
/* nudge anyone waiting on suspend queue */
wake_up(&md->wait);
if (!map || test_bit(DMF_BLOCK_IO, &md->flags))
r = bdi_bits;
else
r = dm_table_any_congested(map, bdi_bits);

dm_table_put(map);
return r;
}

Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/net/usb/asix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1444,10 +1444,6 @@ static const struct usb_device_id products [] = {
// Apple USB Ethernet Adapter
USB_DEVICE(0x05ac, 0x1402),
.driver_info = (unsigned long) &ax88772_info,
}, {
// Cables-to-Go USB Ethernet Adapter
USB_DEVICE(0x0b95, 0x772a),
.driver_info = (unsigned long) &ax88772_info,
},
{ }, // END
};
Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/usb/class/cdc-acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,16 @@ static int acm_wb_is_avail(struct acm *acm)
}

/*
* Finish write. Caller must hold acm->write_lock
* Finish write.
*/
static void acm_write_done(struct acm *acm, struct acm_wb *wb)
{
unsigned long flags;

spin_lock_irqsave(&acm->write_lock, flags);
wb->use = 0;
acm->transmitting--;
spin_unlock_irqrestore(&acm->write_lock, flags);
}

/*
Expand Down Expand Up @@ -478,7 +482,6 @@ static void acm_write_bulk(struct urb *urb)
{
struct acm_wb *wb = urb->context;
struct acm *acm = wb->instance;
unsigned long flags;

if (verbose || urb->status
|| (urb->actual_length != urb->transfer_buffer_length))
Expand All @@ -487,9 +490,7 @@ static void acm_write_bulk(struct urb *urb)
urb->transfer_buffer_length,
urb->status);

spin_lock_irqsave(&acm->write_lock, flags);
acm_write_done(acm, wb);
spin_unlock_irqrestore(&acm->write_lock, flags);
if (ACM_READY(acm))
schedule_work(&acm->work);
else
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/usb/core/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,6 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0)
continue;
dev_dbg(&dev->dev, "unregistering interface %s\n",
dev_name(&interface->dev));
interface->unregistering = 1;
usb_remove_sysfs_intf_files(interface);
device_del(&interface->dev);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/core/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ int usb_create_sysfs_intf_files(struct usb_interface *intf)
struct usb_host_interface *alt = intf->cur_altsetting;
int retval;

if (intf->sysfs_files_created || intf->unregistering)
if (intf->sysfs_files_created)
return 0;

/* The interface string may be present in some altsettings
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/usb/core/urb.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ EXPORT_SYMBOL_GPL(usb_alloc_urb);
* Must be called when a user of a urb is finished with it. When the last user
* of the urb calls this function, the memory of the urb is freed.
*
* Note: The transfer buffer associated with the urb is not freed unless the
* URB_FREE_BUFFER transfer flag is set.
* Note: The transfer buffer associated with the urb is not freed, that must be
* done elsewhere.
*/
void usb_free_urb(struct urb *urb)
{
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/usb/gadget/f_acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,11 +463,7 @@ static int acm_cdc_notify(struct f_acm *acm, u8 type, u16 value,
notify->wLength = cpu_to_le16(length);
memcpy(buf, data, length);

/* ep_queue() can complete immediately if it fills the fifo... */
spin_unlock(&acm->lock);
status = usb_ep_queue(ep, req, GFP_ATOMIC);
spin_lock(&acm->lock);

if (status < 0) {
ERROR(acm->port.func.config->cdev,
"acm ttyGS%d can't notify serial state, %d\n",
Expand Down
23 changes: 17 additions & 6 deletions trunk/drivers/usb/host/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,29 @@ config USB_ISP116X_HCD

config USB_ISP1760_HCD
tristate "ISP 1760 HCD support"
depends on USB && EXPERIMENTAL && (PCI || PPC_OF)
depends on USB && EXPERIMENTAL
---help---
The ISP1760 chip is a USB 2.0 host controller.

This driver does not support isochronous transfers or OTG.
This USB controller is usually attached to a non-DMA-Master
capable bus. NXP's eval kit brings this chip on PCI card
where the chip itself is behind a PLB to simulate such
a bus.

To compile this driver as a module, choose M here: the
module will be called isp1760.
module will be called isp1760-hcd.

config USB_ISP1760_PCI
bool "Support for the PCI bus"
depends on USB_ISP1760_HCD && PCI
---help---
Enables support for the device present on the PCI bus.
This should only be required if you happen to have the eval kit from
NXP and you are going to test it.

config USB_ISP1760_OF
bool "Support for the OF platform bus"
depends on USB_ISP1760_HCD && PPC_OF
---help---
Enables support for the device present on the PowerPC
OpenFirmware platform bus.

config USB_OHCI_HCD
tristate "OHCI HCD support"
Expand Down
25 changes: 13 additions & 12 deletions trunk/drivers/usb/host/ehci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ static int ehci_run (struct usb_hcd *hcd)
static irqreturn_t ehci_irq (struct usb_hcd *hcd)
{
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
u32 status, masked_status, pcd_status = 0, cmd;
u32 status, pcd_status = 0, cmd;
int bh;

spin_lock (&ehci->lock);
Expand All @@ -656,14 +656,14 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
goto dead;
}

masked_status = status & INTR_MASK;
if (!masked_status) { /* irq sharing? */
status &= INTR_MASK;
if (!status) { /* irq sharing? */
spin_unlock(&ehci->lock);
return IRQ_NONE;
}

/* clear (just) interrupts */
ehci_writel(ehci, masked_status, &ehci->regs->status);
ehci_writel(ehci, status, &ehci->regs->status);
cmd = ehci_readl(ehci, &ehci->regs->command);
bh = 0;

Expand Down Expand Up @@ -734,17 +734,18 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)

/* PCI errors [4.15.2.4] */
if (unlikely ((status & STS_FATAL) != 0)) {
ehci_err(ehci, "fatal error\n");
dbg_cmd(ehci, "fatal", cmd);
dbg_status(ehci, "fatal", status);
ehci_halt(ehci);
if (status & STS_HALT) {
ehci_err (ehci, "fatal error\n");
dead:
ehci_reset(ehci);
ehci_writel(ehci, 0, &ehci->regs->configured_flag);
/* generic layer kills/unlinks all urbs, then
* uses ehci_stop to clean up the rest
*/
bh = 1;
ehci_reset (ehci);
ehci_writel(ehci, 0, &ehci->regs->configured_flag);
/* generic layer kills/unlinks all urbs, then
* uses ehci_stop to clean up the rest
*/
bh = 1;
}
}

if (bh)
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/usb/host/ehci-ps3.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ static int ps3_ehci_remove(struct ps3_system_bus_device *dev)

tmp = hcd->irq;

ehci_shutdown(hcd);
usb_remove_hcd(hcd);

ps3_system_bus_set_driver_data(dev, NULL);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/usb/host/ehci-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ iso_stream_init (
*/
stream->usecs = HS_USECS_ISO (maxp);
bandwidth = stream->usecs * 8;
bandwidth /= interval;
bandwidth /= 1 << (interval - 1);

} else {
u32 addr;
Expand Down Expand Up @@ -951,7 +951,7 @@ iso_stream_init (
} else
stream->raw_mask = smask_out [hs_transfers - 1];
bandwidth = stream->usecs + stream->c_usecs;
bandwidth /= interval << 3;
bandwidth /= 1 << (interval + 2);

/* stream->splits gets created from raw_mask later */
stream->address = cpu_to_hc32(ehci, addr);
Expand Down
Loading

0 comments on commit 35bbee4

Please sign in to comment.