summaryrefslogtreecommitdiff
path: root/drivers/scsi/mvsas/mv_sas.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/mvsas/mv_sas.c')
-rw-r--r--drivers/scsi/mvsas/mv_sas.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index 1444b1f1c4c8..359226e80eae 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -151,16 +151,6 @@ static inline u8 mvs_assign_reg_set(struct mvs_info *mvi,
return MVS_CHIP_DISP->assign_reg_set(mvi, &dev->taskfileset);
}
-void mvs_phys_reset(struct mvs_info *mvi, u32 phy_mask, int hard)
-{
- u32 no;
- for_each_phy(phy_mask, phy_mask, no) {
- if (!(phy_mask & 1))
- continue;
- MVS_CHIP_DISP->phy_reset(mvi, no, hard);
- }
-}
-
int mvs_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func,
void *funcdata)
{
@@ -828,7 +818,7 @@ err_out:
dev_printk(KERN_ERR, mvi->dev, "mvsas prep failed[%d]!\n", rc);
if (!sas_protocol_ata(task->task_proto))
if (n_elem)
- dma_unmap_sg(mvi->dev, task->scatter, n_elem,
+ dma_unmap_sg(mvi->dev, task->scatter, task->num_scatter,
task->data_dir);
prep_out:
return rc;
@@ -874,7 +864,7 @@ static void mvs_slot_task_free(struct mvs_info *mvi, struct sas_task *task,
if (!sas_protocol_ata(task->task_proto))
if (slot->n_elem)
dma_unmap_sg(mvi->dev, task->scatter,
- slot->n_elem, task->data_dir);
+ task->num_scatter, task->data_dir);
switch (task->task_proto) {
case SAS_PROTOCOL_SMP:
@@ -986,7 +976,7 @@ static u32 mvs_is_sig_fis_received(u32 irq_status)
static void mvs_sig_remove_timer(struct mvs_phy *phy)
{
if (phy->timer.function)
- del_timer(&phy->timer);
+ timer_delete(&phy->timer);
phy->timer.function = NULL;
}
@@ -1185,7 +1175,7 @@ static int mvs_dev_found_notify(struct domain_device *dev, int lock)
mvi_device->dev_type = dev->dev_type;
mvi_device->mvi_info = mvi;
mvi_device->sas_device = dev;
- if (parent_dev && dev_is_expander(parent_dev->dev_type)) {
+ if (dev_parent_is_expander(dev)) {
int phy_id;
phy_id = sas_find_attached_phy_id(&parent_dev->ex_dev, dev);
@@ -1749,7 +1739,7 @@ static int mvs_handle_event(struct mvs_info *mvi, void *data, int handler)
struct mvs_wq *mwq;
int ret = 0;
- mwq = kmalloc(sizeof(struct mvs_wq), GFP_ATOMIC);
+ mwq = kmalloc_obj(struct mvs_wq, GFP_ATOMIC);
if (mwq) {
mwq->mvi = mvi;
mwq->data = data;
@@ -1765,7 +1755,7 @@ static int mvs_handle_event(struct mvs_info *mvi, void *data, int handler)
static void mvs_sig_time_out(struct timer_list *t)
{
- struct mvs_phy *phy = from_timer(phy, t, timer);
+ struct mvs_phy *phy = timer_container_of(phy, t, timer);
struct mvs_info *mvi = phy->mvi;
u8 phy_no;