|
@@ -728,7 +728,7 @@ enum {
|
|
#define ERR_ON_RX_PHASE(err_phase) (err_phase == 0x10 || \
|
|
#define ERR_ON_RX_PHASE(err_phase) (err_phase == 0x10 || \
|
|
err_phase == 0x20 || err_phase == 0x40)
|
|
err_phase == 0x20 || err_phase == 0x40)
|
|
|
|
|
|
-static void link_timeout_disable_link(unsigned long data);
|
|
|
|
|
|
+static void link_timeout_disable_link(struct timer_list *t);
|
|
|
|
|
|
static u32 hisi_sas_read32(struct hisi_hba *hisi_hba, u32 off)
|
|
static u32 hisi_sas_read32(struct hisi_hba *hisi_hba, u32 off)
|
|
{
|
|
{
|
|
@@ -1270,9 +1270,9 @@ static void init_reg_v2_hw(struct hisi_hba *hisi_hba)
|
|
upper_32_bits(hisi_hba->initial_fis_dma));
|
|
upper_32_bits(hisi_hba->initial_fis_dma));
|
|
}
|
|
}
|
|
|
|
|
|
-static void link_timeout_enable_link(unsigned long data)
|
|
|
|
|
|
+static void link_timeout_enable_link(struct timer_list *t)
|
|
{
|
|
{
|
|
- struct hisi_hba *hisi_hba = (struct hisi_hba *)data;
|
|
|
|
|
|
+ struct hisi_hba *hisi_hba = from_timer(hisi_hba, t, timer);
|
|
int i, reg_val;
|
|
int i, reg_val;
|
|
|
|
|
|
for (i = 0; i < hisi_hba->n_phy; i++) {
|
|
for (i = 0; i < hisi_hba->n_phy; i++) {
|
|
@@ -1287,13 +1287,13 @@ static void link_timeout_enable_link(unsigned long data)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- hisi_hba->timer.function = link_timeout_disable_link;
|
|
|
|
|
|
+ hisi_hba->timer.function = (TIMER_FUNC_TYPE)link_timeout_disable_link;
|
|
mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(900));
|
|
mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(900));
|
|
}
|
|
}
|
|
|
|
|
|
-static void link_timeout_disable_link(unsigned long data)
|
|
|
|
|
|
+static void link_timeout_disable_link(struct timer_list *t)
|
|
{
|
|
{
|
|
- struct hisi_hba *hisi_hba = (struct hisi_hba *)data;
|
|
|
|
|
|
+ struct hisi_hba *hisi_hba = from_timer(hisi_hba, t, timer);
|
|
int i, reg_val;
|
|
int i, reg_val;
|
|
|
|
|
|
reg_val = hisi_sas_read32(hisi_hba, PHY_STATE);
|
|
reg_val = hisi_sas_read32(hisi_hba, PHY_STATE);
|
|
@@ -1308,14 +1308,13 @@ static void link_timeout_disable_link(unsigned long data)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- hisi_hba->timer.function = link_timeout_enable_link;
|
|
|
|
|
|
+ hisi_hba->timer.function = (TIMER_FUNC_TYPE)link_timeout_enable_link;
|
|
mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(100));
|
|
mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(100));
|
|
}
|
|
}
|
|
|
|
|
|
static void set_link_timer_quirk(struct hisi_hba *hisi_hba)
|
|
static void set_link_timer_quirk(struct hisi_hba *hisi_hba)
|
|
{
|
|
{
|
|
- hisi_hba->timer.data = (unsigned long)hisi_hba;
|
|
|
|
- hisi_hba->timer.function = link_timeout_disable_link;
|
|
|
|
|
|
+ hisi_hba->timer.function = (TIMER_FUNC_TYPE)link_timeout_disable_link;
|
|
hisi_hba->timer.expires = jiffies + msecs_to_jiffies(1000);
|
|
hisi_hba->timer.expires = jiffies + msecs_to_jiffies(1000);
|
|
add_timer(&hisi_hba->timer);
|
|
add_timer(&hisi_hba->timer);
|
|
}
|
|
}
|
|
@@ -2574,9 +2573,9 @@ static int prep_ata_v2_hw(struct hisi_hba *hisi_hba,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-static void hisi_sas_internal_abort_quirk_timeout(unsigned long data)
|
|
|
|
|
|
+static void hisi_sas_internal_abort_quirk_timeout(struct timer_list *t)
|
|
{
|
|
{
|
|
- struct hisi_sas_slot *slot = (struct hisi_sas_slot *)data;
|
|
|
|
|
|
+ struct hisi_sas_slot *slot = from_timer(slot, t, internal_abort_timer);
|
|
struct hisi_sas_port *port = slot->port;
|
|
struct hisi_sas_port *port = slot->port;
|
|
struct asd_sas_port *asd_sas_port;
|
|
struct asd_sas_port *asd_sas_port;
|
|
struct asd_sas_phy *sas_phy;
|
|
struct asd_sas_phy *sas_phy;
|
|
@@ -2619,8 +2618,7 @@ static int prep_abort_v2_hw(struct hisi_hba *hisi_hba,
|
|
struct timer_list *timer = &slot->internal_abort_timer;
|
|
struct timer_list *timer = &slot->internal_abort_timer;
|
|
|
|
|
|
/* setup the quirk timer */
|
|
/* setup the quirk timer */
|
|
- setup_timer(timer, hisi_sas_internal_abort_quirk_timeout,
|
|
|
|
- (unsigned long)slot);
|
|
|
|
|
|
+ timer_setup(timer, hisi_sas_internal_abort_quirk_timeout, 0);
|
|
/* Set the timeout to 10ms less than internal abort timeout */
|
|
/* Set the timeout to 10ms less than internal abort timeout */
|
|
mod_timer(timer, jiffies + msecs_to_jiffies(100));
|
|
mod_timer(timer, jiffies + msecs_to_jiffies(100));
|
|
|
|
|