Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119511
b: refs/heads/master
c: 3b5da01
h: refs/heads/master
i:
  119509: fe39a0d
  119507: c95f131
  119503: 31dc5bf
v: v3
  • Loading branch information
Coly Li authored and Mark Fasheh committed Dec 1, 2008
1 parent 67c0c90 commit c23044a
Show file tree
Hide file tree
Showing 16 changed files with 39 additions and 157 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: 7ac01108e71ca8ccc2ded4ee98035d0e5db9c981
refs/heads/master: 3b5da0189c93160e44b878d2c72e9552d642497c
15 changes: 0 additions & 15 deletions trunk/drivers/ata/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1066,21 +1066,6 @@ static int piix_broken_suspend(void)
if (dmi_find_device(DMI_DEV_TYPE_OEM_STRING, oemstrs[i], NULL))
return 1;

/* TECRA M4 sometimes forgets its identify and reports bogus
* DMI information. As the bogus information is a bit
* generic, match as many entries as possible. This manual
* matching is necessary because dmi_system_id.matches is
* limited to four entries.
*/
if (!strcmp(dmi_get_system_info(DMI_SYS_VENDOR), "TOSHIBA") &&
!strcmp(dmi_get_system_info(DMI_PRODUCT_NAME), "000000") &&
!strcmp(dmi_get_system_info(DMI_PRODUCT_VERSION), "000000") &&
!strcmp(dmi_get_system_info(DMI_PRODUCT_SERIAL), "000000") &&
!strcmp(dmi_get_system_info(DMI_BOARD_VENDOR), "TOSHIBA") &&
!strcmp(dmi_get_system_info(DMI_BOARD_NAME), "Portable PC") &&
!strcmp(dmi_get_system_info(DMI_BOARD_VERSION), "Version A0"))
return 1;

return 0;
}

Expand Down
21 changes: 0 additions & 21 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2492,13 +2492,6 @@ int ata_dev_configure(struct ata_device *dev)
}
}

if ((dev->horkage & ATA_HORKAGE_FIRMWARE_WARN) && print_info) {
ata_dev_printk(dev, KERN_WARNING, "WARNING: device requires "
"firmware update to be fully functional.\n");
ata_dev_printk(dev, KERN_WARNING, " contact the vendor "
"or visit http://ata.wiki.kernel.org.\n");
}

return 0;

err_out_nosup:
Expand Down Expand Up @@ -4049,20 +4042,6 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "ST380817AS", "3.42", ATA_HORKAGE_NONCQ },
{ "ST3160023AS", "3.42", ATA_HORKAGE_NONCQ },

/* Seagate NCQ + FLUSH CACHE firmware bug */
{ "ST31500341AS", "9JU138", ATA_HORKAGE_NONCQ |
ATA_HORKAGE_FIRMWARE_WARN },
{ "ST31000333AS", "9FZ136", ATA_HORKAGE_NONCQ |
ATA_HORKAGE_FIRMWARE_WARN },
{ "ST3640623AS", "9FZ164", ATA_HORKAGE_NONCQ |
ATA_HORKAGE_FIRMWARE_WARN },
{ "ST3640323AS", "9FZ134", ATA_HORKAGE_NONCQ |
ATA_HORKAGE_FIRMWARE_WARN },
{ "ST3320813AS", "9FZ182", ATA_HORKAGE_NONCQ |
ATA_HORKAGE_FIRMWARE_WARN },
{ "ST3320613AS", "9FZ162", ATA_HORKAGE_NONCQ |
ATA_HORKAGE_FIRMWARE_WARN },

/* Blacklist entries taken from Silicon Image 3124/3132
Windows driver .inf file - also several Linux problem reports */
{ "HTS541060G9SA00", "MB3OC60D", ATA_HORKAGE_NONCQ, },
Expand Down
15 changes: 5 additions & 10 deletions trunk/drivers/ata/pata_rb532_cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@
#define RB500_CF_MAXPORTS 1
#define RB500_CF_IO_DELAY 400

#define RB500_CF_REG_BASE 0x0800
#define RB500_CF_REG_ERR 0x080D
#define RB500_CF_REG_CMD 0x0800
#define RB500_CF_REG_CTRL 0x080E
/* 32bit buffered data register offset */
#define RB500_CF_REG_DBUF32 0x0C00
#define RB500_CF_REG_DATA 0x0C00

struct rb532_cf_info {
void __iomem *iobase;
Expand Down Expand Up @@ -74,12 +72,11 @@ static void rb532_pata_exec_command(struct ata_port *ap,
rb532_pata_finish_io(ap);
}

static unsigned int rb532_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
static void rb532_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
unsigned int buflen, int write_data)
{
struct ata_port *ap = adev->link->ap;
void __iomem *ioaddr = ap->ioaddr.data_addr;
int retlen = buflen;

if (write_data) {
for (; buflen > 0; buflen--, buf++)
Expand All @@ -90,7 +87,6 @@ static unsigned int rb532_pata_data_xfer(struct ata_device *adev, unsigned char
}

rb532_pata_finish_io(adev->link->ap);
return retlen;
}

static void rb532_pata_freeze(struct ata_port *ap)
Expand Down Expand Up @@ -150,14 +146,13 @@ static void rb532_pata_setup_ports(struct ata_host *ah)
ap->pio_mask = 0x1f; /* PIO4 */
ap->flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO;

ap->ioaddr.cmd_addr = info->iobase + RB500_CF_REG_BASE;
ap->ioaddr.cmd_addr = info->iobase + RB500_CF_REG_CMD;
ap->ioaddr.ctl_addr = info->iobase + RB500_CF_REG_CTRL;
ap->ioaddr.altstatus_addr = info->iobase + RB500_CF_REG_CTRL;

ata_sff_std_ports(&ap->ioaddr);

ap->ioaddr.data_addr = info->iobase + RB500_CF_REG_DBUF32;
ap->ioaddr.error_addr = info->iobase + RB500_CF_REG_ERR;
ap->ioaddr.data_addr = info->iobase + RB500_CF_REG_DATA;
}

static __devinit int rb532_pata_driver_probe(struct platform_device *pdev)
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/infiniband/hw/ehca/ehca_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,14 @@ struct ehca_mod_qp_parm {
/* struct for tracking if cqes have been reported to the application */
struct ehca_qmap_entry {
u16 app_wr_id;
u8 reported;
u8 cqe_req;
u16 reported;
};

struct ehca_queue_map {
struct ehca_qmap_entry *map;
unsigned int entries;
unsigned int tail;
unsigned int left_to_poll;
unsigned int next_wqe_idx; /* Idx to first wqe to be flushed */
};

struct ehca_qp {
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/infiniband/hw/ehca/ehca_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,8 @@ static int ehca_mem_notifier(struct notifier_block *nb,
if (printk_timed_ratelimit(&ehca_dmem_warn_time,
30 * 1000))
ehca_gen_err("DMEM operations are not allowed"
"in conjunction with eHCA");
"as long as an ehca adapter is"
"attached to the LPAR");
return NOTIFY_BAD;
}
}
Expand Down
26 changes: 6 additions & 20 deletions trunk/drivers/infiniband/hw/ehca/ehca_qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,9 @@ static void reset_queue_map(struct ehca_queue_map *qmap)
{
int i;

qmap->tail = qmap->entries - 1;
qmap->left_to_poll = 0;
qmap->next_wqe_idx = 0;
for (i = 0; i < qmap->entries; i++) {
qmap->tail = 0;
for (i = 0; i < qmap->entries; i++)
qmap->map[i].reported = 1;
qmap->map[i].cqe_req = 0;
}
}

/*
Expand Down Expand Up @@ -1125,7 +1121,6 @@ static int calc_left_cqes(u64 wqe_p, struct ipz_queue *ipz_queue,
void *wqe_v;
u64 q_ofs;
u32 wqe_idx;
unsigned int tail_idx;

/* convert real to abs address */
wqe_p = wqe_p & (~(1UL << 63));
Expand All @@ -1138,17 +1133,12 @@ static int calc_left_cqes(u64 wqe_p, struct ipz_queue *ipz_queue,
return -EFAULT;
}

tail_idx = (qmap->tail + 1) % qmap->entries;
wqe_idx = q_ofs / ipz_queue->qe_size;
if (wqe_idx < qmap->tail)
qmap->left_to_poll = (qmap->entries - qmap->tail) + wqe_idx;
else
qmap->left_to_poll = wqe_idx - qmap->tail;

/* check all processed wqes, whether a cqe is requested or not */
while (tail_idx != wqe_idx) {
if (qmap->map[tail_idx].cqe_req)
qmap->left_to_poll++;
tail_idx = (tail_idx + 1) % qmap->entries;
}
/* save index in queue, where we have to start flushing */
qmap->next_wqe_idx = wqe_idx;
return 0;
}

Expand Down Expand Up @@ -1195,14 +1185,10 @@ static int check_for_left_cqes(struct ehca_qp *my_qp, struct ehca_shca *shca)
} else {
spin_lock_irqsave(&my_qp->send_cq->spinlock, flags);
my_qp->sq_map.left_to_poll = 0;
my_qp->sq_map.next_wqe_idx = (my_qp->sq_map.tail + 1) %
my_qp->sq_map.entries;
spin_unlock_irqrestore(&my_qp->send_cq->spinlock, flags);

spin_lock_irqsave(&my_qp->recv_cq->spinlock, flags);
my_qp->rq_map.left_to_poll = 0;
my_qp->rq_map.next_wqe_idx = (my_qp->rq_map.tail + 1) %
my_qp->rq_map.entries;
spin_unlock_irqrestore(&my_qp->recv_cq->spinlock, flags);
}

Expand Down
51 changes: 21 additions & 30 deletions trunk/drivers/infiniband/hw/ehca/ehca_reqs.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ static inline int ehca_write_swqe(struct ehca_qp *qp,

qmap_entry->app_wr_id = get_app_wr_id(send_wr->wr_id);
qmap_entry->reported = 0;
qmap_entry->cqe_req = 0;

switch (send_wr->opcode) {
case IB_WR_SEND:
Expand All @@ -204,10 +203,8 @@ static inline int ehca_write_swqe(struct ehca_qp *qp,

if ((send_wr->send_flags & IB_SEND_SIGNALED ||
qp->init_attr.sq_sig_type == IB_SIGNAL_ALL_WR)
&& !hidden) {
&& !hidden)
wqe_p->wr_flag |= WQE_WRFLAG_REQ_SIGNAL_COM;
qmap_entry->cqe_req = 1;
}

if (send_wr->opcode == IB_WR_SEND_WITH_IMM ||
send_wr->opcode == IB_WR_RDMA_WRITE_WITH_IMM) {
Expand Down Expand Up @@ -572,7 +569,6 @@ static int internal_post_recv(struct ehca_qp *my_qp,
qmap_entry = &my_qp->rq_map.map[rq_map_idx];
qmap_entry->app_wr_id = get_app_wr_id(cur_recv_wr->wr_id);
qmap_entry->reported = 0;
qmap_entry->cqe_req = 1;

wqe_cnt++;
} /* eof for cur_recv_wr */
Expand Down Expand Up @@ -710,34 +706,27 @@ static inline int ehca_poll_cq_one(struct ib_cq *cq, struct ib_wc *wc)
goto repoll;
wc->qp = &my_qp->ib_qp;

qmap_tail_idx = get_app_wr_id(cqe->work_request_id);
if (!(cqe->w_completion_flags & WC_SEND_RECEIVE_BIT))
/* We got a send completion. */
qmap = &my_qp->sq_map;
else
/* We got a receive completion. */
qmap = &my_qp->rq_map;

/* advance the tail pointer */
qmap->tail = qmap_tail_idx;

if (is_error) {
/*
* set left_to_poll to 0 because in error state, we will not
* get any additional CQEs
*/
my_qp->sq_map.next_wqe_idx = (my_qp->sq_map.tail + 1) %
my_qp->sq_map.entries;
my_qp->sq_map.left_to_poll = 0;
ehca_add_to_err_list(my_qp, 1);
my_qp->sq_map.left_to_poll = 0;

my_qp->rq_map.next_wqe_idx = (my_qp->rq_map.tail + 1) %
my_qp->rq_map.entries;
my_qp->rq_map.left_to_poll = 0;
if (HAS_RQ(my_qp))
ehca_add_to_err_list(my_qp, 0);
my_qp->rq_map.left_to_poll = 0;
}

qmap_tail_idx = get_app_wr_id(cqe->work_request_id);
if (!(cqe->w_completion_flags & WC_SEND_RECEIVE_BIT))
/* We got a send completion. */
qmap = &my_qp->sq_map;
else
/* We got a receive completion. */
qmap = &my_qp->rq_map;

qmap_entry = &qmap->map[qmap_tail_idx];
if (qmap_entry->reported) {
ehca_warn(cq->device, "Double cqe on qp_num=%#x",
Expand All @@ -749,6 +738,10 @@ static inline int ehca_poll_cq_one(struct ib_cq *cq, struct ib_wc *wc)
wc->wr_id = replace_wr_id(cqe->work_request_id, qmap_entry->app_wr_id);
qmap_entry->reported = 1;

/* this is a proper completion, we need to advance the tail pointer */
if (++qmap->tail == qmap->entries)
qmap->tail = 0;

/* if left_to_poll is decremented to 0, add the QP to the error list */
if (qmap->left_to_poll > 0) {
qmap->left_to_poll--;
Expand Down Expand Up @@ -812,14 +805,13 @@ static int generate_flush_cqes(struct ehca_qp *my_qp, struct ib_cq *cq,
else
qmap = &my_qp->rq_map;

qmap_entry = &qmap->map[qmap->next_wqe_idx];
qmap_entry = &qmap->map[qmap->tail];

while ((nr < num_entries) && (qmap_entry->reported == 0)) {
/* generate flush CQE */

memset(wc, 0, sizeof(*wc));

offset = qmap->next_wqe_idx * ipz_queue->qe_size;
offset = qmap->tail * ipz_queue->qe_size;
wqe = (struct ehca_wqe *)ipz_qeit_calc(ipz_queue, offset);
if (!wqe) {
ehca_err(cq->device, "Invalid wqe offset=%#lx on "
Expand Down Expand Up @@ -858,12 +850,11 @@ static int generate_flush_cqes(struct ehca_qp *my_qp, struct ib_cq *cq,

wc->qp = &my_qp->ib_qp;

/* mark as reported and advance next_wqe pointer */
/* mark as reported and advance tail pointer */
qmap_entry->reported = 1;
qmap->next_wqe_idx++;
if (qmap->next_wqe_idx == qmap->entries)
qmap->next_wqe_idx = 0;
qmap_entry = &qmap->map[qmap->next_wqe_idx];
if (++qmap->tail == qmap->entries)
qmap->tail = 0;
qmap_entry = &qmap->map[qmap->tail];

wc++; nr++;
}
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/infiniband/hw/mlx4/cq.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
{
struct mlx4_ib_dev *dev = to_mdev(ibcq->device);
struct mlx4_ib_cq *cq = to_mcq(ibcq);
struct mlx4_mtt mtt;
int outst_cqe;
int err;

Expand Down Expand Up @@ -377,13 +376,10 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
goto out;
}

mtt = cq->buf.mtt;

err = mlx4_cq_resize(dev->dev, &cq->mcq, entries, &cq->resize_buf->buf.mtt);
if (err)
goto err_buf;

mlx4_mtt_cleanup(dev->dev, &mtt);
if (ibcq->uobject) {
cq->buf = cq->resize_buf->buf;
cq->ibcq.cqe = cq->resize_buf->cqe;
Expand All @@ -410,7 +406,6 @@ int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
goto out;

err_buf:
mlx4_mtt_cleanup(dev->dev, &cq->resize_buf->buf.mtt);
if (!ibcq->uobject)
mlx4_ib_free_cq_buf(dev, &cq->resize_buf->buf,
cq->resize_buf->cqe);
Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/net/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,6 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
struct mlx4_priv *priv = mlx4_priv(dev);
int err;
int port;
__be32 ib_port_default_caps;

err = mlx4_init_uar_table(dev);
if (err) {
Expand Down Expand Up @@ -853,13 +852,6 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
}

for (port = 1; port <= dev->caps.num_ports; port++) {
ib_port_default_caps = 0;
err = mlx4_get_port_ib_caps(dev, port, &ib_port_default_caps);
if (err)
mlx4_warn(dev, "failed to get port %d default "
"ib capabilities (%d). Continuing with "
"caps = 0\n", port, err);
dev->caps.ib_port_def_cap[port] = ib_port_default_caps;
err = mlx4_SET_PORT(dev, port);
if (err) {
mlx4_err(dev, "Failed to set port %d, aborting\n",
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/mlx4/mlx4.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,5 @@ void mlx4_init_mac_table(struct mlx4_dev *dev, struct mlx4_mac_table *table);
void mlx4_init_vlan_table(struct mlx4_dev *dev, struct mlx4_vlan_table *table);

int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port);
int mlx4_get_port_ib_caps(struct mlx4_dev *dev, u8 port, __be32 *caps);

#endif /* MLX4_H */
Loading

0 comments on commit c23044a

Please sign in to comment.