Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64831
b: refs/heads/master
c: 01a6a77
h: refs/heads/master
i:
  64829: 2d67c1b
  64827: 84c9f67
  64823: 2a67d9e
  64815: 80d2f87
  64799: 50c212d
  64767: 05c18eb
v: v3
  • Loading branch information
Linus Torvalds committed Sep 11, 2007
1 parent ed4d8d6 commit d4717b5
Show file tree
Hide file tree
Showing 43 changed files with 283 additions and 171 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: 99fa9844f0eed5582b5648f745204758b27db659
refs/heads/master: 01a6a7790e8e466584fc845f3cfc1770ffa1fee5
10 changes: 7 additions & 3 deletions trunk/Documentation/networking/multiqueue.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,13 @@ software, so it's a straight round-robin qdisc. It uses the same syntax and
classification priomap that sch_prio uses, so it should be intuitive to
configure for people who've used sch_prio.

The PRIO qdisc naturally plugs into a multiqueue device. If PRIO has been
built with NET_SCH_PRIO_MQ, then upon load, it will make sure the number of
bands requested is equal to the number of queues on the hardware. If they
In order to utilitize the multiqueue features of the qdiscs, the network
device layer needs to enable multiple queue support. This can be done by
selecting NETDEVICES_MULTIQUEUE under Drivers.

The PRIO qdisc naturally plugs into a multiqueue device. If
NETDEVICES_MULTIQUEUE is selected, then on qdisc load, the number of
bands requested is compared to the number of queues on the hardware. If they
are equal, it sets a one-to-one mapping up between the queues and bands. If
they're not equal, it will not load the qdisc. This is the same behavior
for RR. Once the association is made, any skb that is classified will have
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/bluetooth/hci_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,15 +691,18 @@ static void hci_usb_rx_complete(struct urb *urb)
urb->iso_frame_desc[i].offset,
urb->iso_frame_desc[i].actual_length);

if (!urb->iso_frame_desc[i].status)
if (!urb->iso_frame_desc[i].status) {
husb->hdev->stat.byte_rx += urb->iso_frame_desc[i].actual_length;
hci_recv_fragment(husb->hdev, _urb->type,
urb->transfer_buffer + urb->iso_frame_desc[i].offset,
urb->iso_frame_desc[i].actual_length);
}
}
#else
;
#endif
} else {
husb->hdev->stat.byte_rx += count;
err = hci_recv_fragment(husb->hdev, _urb->type, urb->transfer_buffer, count);
if (err < 0) {
BT_ERR("%s corrupted packet: type %d count %d",
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/mmc/host/at91_mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ static int __exit at91_mci_remove(struct platform_device *pdev)

host = mmc_priv(mmc);

if (host->present != -1) {
if (host->board->det_pin) {
device_init_wakeup(&pdev->dev, 0);
free_irq(host->board->det_pin, host);
cancel_delayed_work(&host->mmc->detect);
Expand Down Expand Up @@ -972,7 +972,7 @@ static int at91_mci_suspend(struct platform_device *pdev, pm_message_t state)
struct at91mci_host *host = mmc_priv(mmc);
int ret = 0;

if (device_may_wakeup(&pdev->dev))
if (host->board->det_pin && device_may_wakeup(&pdev->dev))
enable_irq_wake(host->board->det_pin);

if (mmc)
Expand All @@ -987,7 +987,7 @@ static int at91_mci_resume(struct platform_device *pdev)
struct at91mci_host *host = mmc_priv(mmc);
int ret = 0;

if (device_may_wakeup(&pdev->dev))
if (host->board->det_pin && device_may_wakeup(&pdev->dev))
disable_irq_wake(host->board->det_pin);

if (mmc)
Expand Down
13 changes: 11 additions & 2 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@

#define DRV_MODULE_NAME "tg3"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "3.80"
#define DRV_MODULE_RELDATE "August 2, 2007"
#define DRV_MODULE_VERSION "3.81"
#define DRV_MODULE_RELDATE "September 5, 2007"

#define TG3_DEF_MAC_MODE 0
#define TG3_DEF_RX_MODE 0
Expand Down Expand Up @@ -7127,6 +7127,10 @@ static int tg3_open(struct net_device *dev)
} else if (pci_enable_msi(tp->pdev) == 0) {
u32 msi_mode;

/* Hardware bug - MSI won't work if INTX disabled. */
if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS)
pci_intx(tp->pdev, 1);

msi_mode = tr32(MSGINT_MODE);
tw32(MSGINT_MODE, msi_mode | MSGINT_MODE_ENABLE);
tp->tg3_flags2 |= TG3_FLG2_USING_MSI;
Expand Down Expand Up @@ -12172,6 +12176,11 @@ static int tg3_resume(struct pci_dev *pdev)
if (err)
return err;

/* Hardware bug - MSI won't work if INTX disabled. */
if ((tp->tg3_flags2 & TG3_FLG2_5780_CLASS) &&
(tp->tg3_flags2 & TG3_FLG2_USING_MSI))
pci_intx(tp->pdev, 1);

netif_device_attach(dev);

tg3_full_lock(tp, 0);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/s390/scsi/zfcp_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,7 @@ zfcp_gid_pn_buffers_alloc(struct zfcp_gid_pn_data **gid_pn, mempool_t *pool)
data->ct.pool = pool;
}
} else {
data = kmalloc(sizeof(struct zfcp_gid_pn_data), GFP_ATOMIC);
data = kmem_cache_alloc(zfcp_data.gid_pn_cache, GFP_ATOMIC);
}

if (NULL == data)
Expand Down Expand Up @@ -1531,7 +1531,7 @@ static void zfcp_gid_pn_buffers_free(struct zfcp_gid_pn_data *gid_pn)
if (gid_pn->ct.pool)
mempool_free(gid_pn, gid_pn->ct.pool);
else
kfree(gid_pn);
kmem_cache_free(zfcp_data.gid_pn_cache, gid_pn);
}

/**
Expand Down
10 changes: 3 additions & 7 deletions trunk/drivers/s390/scsi/zfcp_qdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,13 +640,9 @@ int
zfcp_qdio_sbals_from_scsicmnd(struct zfcp_fsf_req *fsf_req,
unsigned long sbtype, struct scsi_cmnd *scsi_cmnd)
{
if (scsi_sg_count(scsi_cmnd))
return zfcp_qdio_sbals_from_sg(fsf_req, sbtype,
scsi_sglist(scsi_cmnd),
scsi_sg_count(scsi_cmnd),
ZFCP_MAX_SBALS_PER_REQ);
else
return 0;
return zfcp_qdio_sbals_from_sg(fsf_req, sbtype, scsi_sglist(scsi_cmnd),
scsi_sg_count(scsi_cmnd),
ZFCP_MAX_SBALS_PER_REQ);
}

/**
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/s390/scsi/zfcp_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,9 @@ zfcp_reset_fc_host_stats(struct Scsi_Host *shost)
return;

ret = zfcp_fsf_exchange_port_data(NULL, adapter, data);
if (ret == 0) {
if (ret) {
kfree(data);
} else {
adapter->stats_reset = jiffies/HZ;
old_data = adapter->stats_reset_data;
adapter->stats_reset_data = data; /* finally freed in
Expand Down
65 changes: 52 additions & 13 deletions trunk/drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,12 +737,19 @@ static int iscsi_data_xmit(struct iscsi_conn *conn)
*/
conn->ctask = list_entry(conn->xmitqueue.next,
struct iscsi_cmd_task, running);
if (conn->ctask->state == ISCSI_TASK_PENDING) {
switch (conn->ctask->state) {
case ISCSI_TASK_ABORTING:
break;
case ISCSI_TASK_PENDING:
iscsi_prep_scsi_cmd_pdu(conn->ctask);
conn->session->tt->init_cmd_task(conn->ctask);
/* fall through */
default:
conn->ctask->state = ISCSI_TASK_RUNNING;
break;
}
conn->ctask->state = ISCSI_TASK_RUNNING;
list_move_tail(conn->xmitqueue.next, &conn->run_list);

rc = iscsi_xmit_ctask(conn);
if (rc)
goto again;
Expand Down Expand Up @@ -1049,7 +1056,9 @@ static int iscsi_exec_abort_task(struct scsi_cmnd *sc,
ctask->mtask = __iscsi_conn_send_pdu(conn, (struct iscsi_hdr *)hdr,
NULL, 0);
if (!ctask->mtask) {
spin_unlock_bh(&session->lock);
iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
spin_lock_bh(&session->lock)
debug_scsi("abort sent failure [itt 0x%x]\n", ctask->itt);
return -EPERM;
}
Expand All @@ -1066,6 +1075,7 @@ static int iscsi_exec_abort_task(struct scsi_cmnd *sc,
debug_scsi("abort set timeout [itt 0x%x]\n", ctask->itt);
}
spin_unlock_bh(&session->lock);
mutex_unlock(&session->eh_mutex);
scsi_queue_work(session->host, &conn->xmitwork);

/*
Expand All @@ -1083,6 +1093,7 @@ static int iscsi_exec_abort_task(struct scsi_cmnd *sc,
if (signal_pending(current))
flush_signals(current);
del_timer_sync(&conn->tmabort_timer);
mutex_lock(&session->eh_mutex);
spin_lock_bh(&session->lock);
return 0;
}
Expand Down Expand Up @@ -1158,31 +1169,45 @@ static void fail_command(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask,
__iscsi_put_ctask(ctask);
}

static void iscsi_suspend_tx(struct iscsi_conn *conn)
{
set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
scsi_flush_work(conn->session->host);
}

static void iscsi_start_tx(struct iscsi_conn *conn)
{
clear_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
scsi_queue_work(conn->session->host, &conn->xmitwork);
}

int iscsi_eh_abort(struct scsi_cmnd *sc)
{
struct Scsi_Host *host = sc->device->host;
struct iscsi_session *session = iscsi_hostdata(host->hostdata);
struct iscsi_cmd_task *ctask;
struct iscsi_conn *conn;
struct iscsi_session *session;
int rc;

mutex_lock(&session->eh_mutex);
spin_lock_bh(&session->lock);
/*
* if session was ISCSI_STATE_IN_RECOVERY then we may not have
* got the command.
*/
if (!sc->SCp.ptr) {
debug_scsi("sc never reached iscsi layer or it completed.\n");
spin_unlock_bh(&session->lock);
mutex_unlock(&session->eh_mutex);
return SUCCESS;
}

ctask = (struct iscsi_cmd_task *)sc->SCp.ptr;
conn = ctask->conn;
session = conn->session;

conn->eh_abort_cnt++;
debug_scsi("aborting [sc %p itt 0x%x]\n", sc, ctask->itt);

spin_lock_bh(&session->lock);

/*
* If we are not logged in or we have started a new session
* then let the host reset code handle this
Expand Down Expand Up @@ -1219,6 +1244,7 @@ int iscsi_eh_abort(struct scsi_cmnd *sc)
switch (conn->tmabort_state) {
case TMABORT_SUCCESS:
spin_unlock_bh(&session->lock);
iscsi_suspend_tx(conn);
/*
* clean up task if aborted. grab the recv lock as a writer
*/
Expand All @@ -1227,11 +1253,7 @@ int iscsi_eh_abort(struct scsi_cmnd *sc)
fail_command(conn, ctask, DID_ABORT << 16);
spin_unlock(&session->lock);
write_unlock_bh(conn->recv_lock);
/*
* make sure xmit thread is not still touching the
* ctask/scsi_cmnd
*/
scsi_flush_work(session->host);
iscsi_start_tx(conn);
goto success_unlocked;
case TMABORT_NOT_FOUND:
if (!ctask->sc) {
Expand All @@ -1251,12 +1273,14 @@ int iscsi_eh_abort(struct scsi_cmnd *sc)
spin_unlock_bh(&session->lock);
success_unlocked:
debug_scsi("abort success [sc %lx itt 0x%x]\n", (long)sc, ctask->itt);
mutex_unlock(&session->eh_mutex);
return SUCCESS;

failed:
spin_unlock_bh(&session->lock);
failed_unlocked:
debug_scsi("abort failed [sc %lx itt 0x%x]\n", (long)sc, ctask->itt);
mutex_unlock(&session->eh_mutex);
return FAILED;
}
EXPORT_SYMBOL_GPL(iscsi_eh_abort);
Expand Down Expand Up @@ -1403,6 +1427,7 @@ iscsi_session_setup(struct iscsi_transport *iscsit,
session->max_cmdsn = initial_cmdsn + 1;
session->max_r2t = 1;
session->tt = iscsit;
mutex_init(&session->eh_mutex);

/* initialize SCSI PDU commands pool */
if (iscsi_pool_init(&session->cmdpool, session->cmds_max,
Expand Down Expand Up @@ -1736,9 +1761,22 @@ static void iscsi_start_session_recovery(struct iscsi_session *session,
{
int old_stop_stage;

mutex_lock(&session->eh_mutex);
spin_lock_bh(&session->lock);
if (conn->stop_stage == STOP_CONN_TERM) {
spin_unlock_bh(&session->lock);
mutex_unlock(&session->eh_mutex);
return;
}

/*
* The LLD either freed/unset the lock on us, or userspace called
* stop but did not create a proper connection (connection was never
* bound or it was unbound then stop was called).
*/
if (!conn->recv_lock) {
spin_unlock_bh(&session->lock);
mutex_unlock(&session->eh_mutex);
return;
}

Expand All @@ -1755,9 +1793,9 @@ static void iscsi_start_session_recovery(struct iscsi_session *session,
old_stop_stage = conn->stop_stage;
conn->stop_stage = flag;
conn->c_stage = ISCSI_CONN_STOPPED;
set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
spin_unlock_bh(&session->lock);
scsi_flush_work(session->host);

iscsi_suspend_tx(conn);

write_lock_bh(conn->recv_lock);
set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx);
Expand Down Expand Up @@ -1786,6 +1824,7 @@ static void iscsi_start_session_recovery(struct iscsi_session *session,
fail_all_commands(conn);
flush_control_queues(session, conn);
spin_unlock_bh(&session->lock);
mutex_unlock(&session->eh_mutex);
}

void iscsi_conn_stop(struct iscsi_cls_conn *cls_conn, int flag)
Expand Down
21 changes: 9 additions & 12 deletions trunk/drivers/scsi/qla2xxx/qla_dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2050,21 +2050,18 @@ qla25xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked)
void
qla2x00_dump_regs(scsi_qla_host_t *ha)
{
int i;
struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
struct device_reg_24xx __iomem *reg24 = &ha->iobase->isp24;
uint16_t __iomem *mbx_reg;

mbx_reg = IS_FWI2_CAPABLE(ha) ? &reg24->mailbox0:
MAILBOX_REG(ha, reg, 0);

printk("Mailbox registers:\n");
printk("scsi(%ld): mbox 0 0x%04x \n",
ha->host_no, RD_MAILBOX_REG(ha, reg, 0));
printk("scsi(%ld): mbox 1 0x%04x \n",
ha->host_no, RD_MAILBOX_REG(ha, reg, 1));
printk("scsi(%ld): mbox 2 0x%04x \n",
ha->host_no, RD_MAILBOX_REG(ha, reg, 2));
printk("scsi(%ld): mbox 3 0x%04x \n",
ha->host_no, RD_MAILBOX_REG(ha, reg, 3));
printk("scsi(%ld): mbox 4 0x%04x \n",
ha->host_no, RD_MAILBOX_REG(ha, reg, 4));
printk("scsi(%ld): mbox 5 0x%04x \n",
ha->host_no, RD_MAILBOX_REG(ha, reg, 5));
for (i = 0; i < 6; i++)
printk("scsi(%ld): mbox %d 0x%04x \n", ha->host_no, i,
RD_REG_WORD(mbx_reg++));
}


Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/scsi/qla2xxx/qla_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,6 @@ typedef struct {
uint8_t node_name[WWN_SIZE];
uint8_t port_name[WWN_SIZE];
uint8_t fabric_port_name[WWN_SIZE];
uint16_t fp_speeds;
uint16_t fp_speed;
} sw_info_t;

Expand Down
Loading

0 comments on commit d4717b5

Please sign in to comment.