Home
last modified time | relevance | path

Searched refs:sc (Results 1 – 25 of 401) sorted by relevance

12345678910>>...17

/Linux-v4.19/drivers/net/wan/lmc/
Dlmc_media.c158 lmc_dummy_set_1 (lmc_softc_t * const sc, int a) in lmc_dummy_set_1() argument
163 lmc_dummy_set2_1 (lmc_softc_t * const sc, lmc_ctl_t * a) in lmc_dummy_set2_1() argument
172 lmc_hssi_init (lmc_softc_t * const sc) in lmc_hssi_init() argument
174 sc->ictl.cardtype = LMC_CTL_CARDTYPE_LMC5200; in lmc_hssi_init()
176 lmc_gpio_mkoutput (sc, LMC_GEP_HSSI_CLOCK); in lmc_hssi_init()
180 lmc_hssi_default (lmc_softc_t * const sc) in lmc_hssi_default() argument
182 sc->lmc_miireg16 = LMC_MII16_LED_ALL; in lmc_hssi_default()
184 sc->lmc_media->set_link_status (sc, LMC_LINK_DOWN); in lmc_hssi_default()
185 sc->lmc_media->set_clock_source (sc, LMC_CTL_CLOCK_SOURCE_EXT); in lmc_hssi_default()
186 sc->lmc_media->set_crc_length (sc, LMC_CTL_CRC_LENGTH_16); in lmc_hssi_default()
[all …]
Dlmc_main.c98 static void lmc_initcsrs(lmc_softc_t * const sc, lmc_csrptr_t csr_base, size_t csr_size);
103 static void lmc_reset(lmc_softc_t * const sc);
104 static void lmc_dec_reset(lmc_softc_t * const sc);
113 lmc_softc_t *sc = dev_to_sc(dev); in lmc_ioctl() local
132 if (copy_to_user(ifr->ifr_data, &sc->ictl, sizeof(lmc_ctl_t))) in lmc_ioctl()
154 spin_lock_irqsave(&sc->lmc_lock, flags); in lmc_ioctl()
155 sc->lmc_media->set_status (sc, &ctl); in lmc_ioctl()
157 if(ctl.crc_length != sc->ictl.crc_length) { in lmc_ioctl()
158 sc->lmc_media->set_crc_length(sc, ctl.crc_length); in lmc_ioctl()
159 if (sc->ictl.crc_length == LMC_CTL_CRC_LENGTH_16) in lmc_ioctl()
[all …]
Dlmc_proto.c50 void lmc_proto_attach(lmc_softc_t *sc) /*FOLD00*/ in lmc_proto_attach() argument
52 lmc_trace(sc->lmc_device, "lmc_proto_attach in"); in lmc_proto_attach()
53 if (sc->if_type == LMC_NET) { in lmc_proto_attach()
54 struct net_device *dev = sc->lmc_device; in lmc_proto_attach()
62 lmc_trace(sc->lmc_device, "lmc_proto_attach out"); in lmc_proto_attach()
65 int lmc_proto_ioctl(lmc_softc_t *sc, struct ifreq *ifr, int cmd) in lmc_proto_ioctl() argument
67 lmc_trace(sc->lmc_device, "lmc_proto_ioctl"); in lmc_proto_ioctl()
68 if (sc->if_type == LMC_PPP) in lmc_proto_ioctl()
69 return hdlc_ioctl(sc->lmc_device, ifr, cmd); in lmc_proto_ioctl()
73 int lmc_proto_open(lmc_softc_t *sc) in lmc_proto_open() argument
[all …]
/Linux-v4.19/drivers/net/wireless/ath/ath9k/
Dchannel.c23 static int ath_set_channel(struct ath_softc *sc) in ath_set_channel() argument
25 struct ath_hw *ah = sc->sc_ah; in ath_set_channel()
27 struct ieee80211_hw *hw = sc->hw; in ath_set_channel()
29 struct cfg80211_chan_def *chandef = &sc->cur_chan->chandef; in ath_set_channel()
47 ath_update_survey_stats(sc); in ath_set_channel()
57 if (!sc->cur_chan->offchannel && sc->cur_survey != &sc->survey[pos]) { in ath_set_channel()
58 if (sc->cur_survey) in ath_set_channel()
59 sc->cur_survey->filled &= ~SURVEY_INFO_IN_USE; in ath_set_channel()
61 sc->cur_survey = &sc->survey[pos]; in ath_set_channel()
63 memset(sc->cur_survey, 0, sizeof(struct survey_info)); in ath_set_channel()
[all …]
Dmain.c57 static bool ath9k_has_pending_frames(struct ath_softc *sc, struct ath_txq *txq, in ath9k_has_pending_frames() argument
75 acq = &sc->cur_chan->acq[txq->mac80211_qnum]; in ath9k_has_pending_frames()
84 static bool ath9k_setpower(struct ath_softc *sc, enum ath9k_power_mode mode) in ath9k_setpower() argument
89 spin_lock_irqsave(&sc->sc_pm_lock, flags); in ath9k_setpower()
90 ret = ath9k_hw_setpower(sc->sc_ah, mode); in ath9k_setpower()
91 spin_unlock_irqrestore(&sc->sc_pm_lock, flags); in ath9k_setpower()
98 struct ath_softc *sc = from_timer(sc, t, sleep_timer); in ath_ps_full_sleep() local
99 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in ath_ps_full_sleep()
107 ath9k_hw_setrxabort(sc->sc_ah, 1); in ath_ps_full_sleep()
108 ath9k_hw_stopdmarecv(sc->sc_ah, &reset); in ath_ps_full_sleep()
[all …]
Drecv.c23 static inline bool ath9k_check_auto_sleep(struct ath_softc *sc) in ath9k_check_auto_sleep() argument
25 return sc->ps_enabled && in ath9k_check_auto_sleep()
26 (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP); in ath9k_check_auto_sleep()
37 static void ath_rx_buf_link(struct ath_softc *sc, struct ath_rxbuf *bf, in ath_rx_buf_link() argument
40 struct ath_hw *ah = sc->sc_ah; in ath_rx_buf_link()
63 if (sc->rx.rxlink) in ath_rx_buf_link()
64 *sc->rx.rxlink = bf->bf_daddr; in ath_rx_buf_link()
68 sc->rx.rxlink = &ds->ds_link; in ath_rx_buf_link()
71 static void ath_rx_buf_relink(struct ath_softc *sc, struct ath_rxbuf *bf, in ath_rx_buf_relink() argument
74 if (sc->rx.buf_hold) in ath_rx_buf_relink()
[all …]
Dbeacon.c22 static void ath9k_reset_beacon_status(struct ath_softc *sc) in ath9k_reset_beacon_status() argument
24 sc->beacon.tx_processed = false; in ath9k_reset_beacon_status()
25 sc->beacon.tx_last = false; in ath9k_reset_beacon_status()
33 static void ath9k_beaconq_config(struct ath_softc *sc) in ath9k_beaconq_config() argument
35 struct ath_hw *ah = sc->sc_ah; in ath9k_beaconq_config()
40 ath9k_hw_get_txq_props(ah, sc->beacon.beaconq, &qi); in ath9k_beaconq_config()
42 if (sc->sc_ah->opmode == NL80211_IFTYPE_AP || in ath9k_beaconq_config()
43 sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT) { in ath9k_beaconq_config()
50 txq = sc->tx.txq_map[IEEE80211_AC_BE]; in ath9k_beaconq_config()
60 if (!ath9k_hw_set_txq_props(ah, sc->beacon.beaconq, &qi)) { in ath9k_beaconq_config()
[all …]
Dgpio.c25 static void ath_fill_led_pin(struct ath_softc *sc) in ath_fill_led_pin() argument
27 struct ath_hw *ah = sc->sc_ah; in ath_fill_led_pin()
54 struct ath_softc *sc = container_of(led_cdev, struct ath_softc, led_cdev); in ath_led_brightness() local
57 if (sc->sc_ah->config.led_active_high) in ath_led_brightness()
60 ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val); in ath_led_brightness()
63 void ath_deinit_leds(struct ath_softc *sc) in ath_deinit_leds() argument
65 if (!sc->led_registered) in ath_deinit_leds()
68 ath_led_brightness(&sc->led_cdev, LED_OFF); in ath_deinit_leds()
69 led_classdev_unregister(&sc->led_cdev); in ath_deinit_leds()
71 ath9k_hw_gpio_free(sc->sc_ah, sc->sc_ah->led_pin); in ath_deinit_leds()
[all …]
Dtx99.c19 static void ath9k_tx99_stop(struct ath_softc *sc) in ath9k_tx99_stop() argument
21 struct ath_hw *ah = sc->sc_ah; in ath9k_tx99_stop()
24 ath_drain_all_txq(sc); in ath9k_tx99_stop()
25 ath_startrecv(sc); in ath9k_tx99_stop()
30 ieee80211_wake_queues(sc->hw); in ath9k_tx99_stop()
32 kfree_skb(sc->tx99_skb); in ath9k_tx99_stop()
33 sc->tx99_skb = NULL; in ath9k_tx99_stop()
34 sc->tx99_state = false; in ath9k_tx99_stop()
36 ath9k_hw_tx99_stop(sc->sc_ah); in ath9k_tx99_stop()
40 static struct sk_buff *ath9k_build_tx99_skb(struct ath_softc *sc) in ath9k_build_tx99_skb() argument
[all …]
Dinit.c150 static void ath9k_deinit_softc(struct ath_softc *sc);
177 struct ath_softc *sc = (struct ath_softc *) common->priv; in ath9k_iowrite32() local
181 spin_lock_irqsave(&sc->sc_serial_rw, flags); in ath9k_iowrite32()
182 iowrite32(val, sc->mem + reg_offset); in ath9k_iowrite32()
183 spin_unlock_irqrestore(&sc->sc_serial_rw, flags); in ath9k_iowrite32()
185 iowrite32(val, sc->mem + reg_offset); in ath9k_iowrite32()
192 struct ath_softc *sc = (struct ath_softc *) common->priv; in ath9k_ioread32() local
197 spin_lock_irqsave(&sc->sc_serial_rw, flags); in ath9k_ioread32()
198 val = ioread32(sc->mem + reg_offset); in ath9k_ioread32()
199 spin_unlock_irqrestore(&sc->sc_serial_rw, flags); in ath9k_ioread32()
[all …]
/Linux-v4.19/fs/xfs/scrub/
Dagheader.c32 struct xfs_scrub *sc, in xchk_superblock_xref() argument
36 struct xfs_mount *mp = sc->mp; in xchk_superblock_xref()
37 xfs_agnumber_t agno = sc->sm->sm_agno; in xchk_superblock_xref()
41 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_superblock_xref()
46 error = xchk_ag_init(sc, agno, &sc->sa); in xchk_superblock_xref()
47 if (!xchk_xref_process_error(sc, agno, agbno, &error)) in xchk_superblock_xref()
50 xchk_xref_is_used_space(sc, agbno, 1); in xchk_superblock_xref()
51 xchk_xref_is_not_inode_chunk(sc, agbno, 1); in xchk_superblock_xref()
53 xchk_xref_is_owned_by(sc, agbno, 1, &oinfo); in xchk_superblock_xref()
54 xchk_xref_is_not_shared(sc, agbno, 1); in xchk_superblock_xref()
[all …]
Dcommon.c72 struct xfs_scrub *sc, in __xchk_process_error() argument
84 trace_xchk_deadlock_retry(sc->ip, sc->sm, *error); in __xchk_process_error()
89 sc->sm->sm_flags |= errflag; in __xchk_process_error()
93 trace_xchk_op_error(sc, agno, bno, *error, in __xchk_process_error()
102 struct xfs_scrub *sc, in xchk_process_error() argument
107 return __xchk_process_error(sc, agno, bno, error, in xchk_process_error()
113 struct xfs_scrub *sc, in xchk_xref_process_error() argument
118 return __xchk_process_error(sc, agno, bno, error, in xchk_xref_process_error()
125 struct xfs_scrub *sc, in __xchk_fblock_process_error() argument
137 trace_xchk_deadlock_retry(sc->ip, sc->sm, *error); in __xchk_fblock_process_error()
[all …]
Dinode.c41 struct xfs_scrub *sc, in xchk_setup_inode() argument
50 error = xchk_get_inode(sc, ip); in xchk_setup_inode()
56 return xchk_trans_alloc(sc, 0); in xchk_setup_inode()
62 sc->ilock_flags = XFS_IOLOCK_EXCL | XFS_MMAPLOCK_EXCL; in xchk_setup_inode()
63 xfs_ilock(sc->ip, sc->ilock_flags); in xchk_setup_inode()
64 error = xchk_trans_alloc(sc, 0); in xchk_setup_inode()
67 sc->ilock_flags |= XFS_ILOCK_EXCL; in xchk_setup_inode()
68 xfs_ilock(sc->ip, XFS_ILOCK_EXCL); in xchk_setup_inode()
80 struct xfs_scrub *sc, in xchk_inode_extsize() argument
88 fa = xfs_inode_validate_extsize(sc->mp, be32_to_cpu(dip->di_extsize), in xchk_inode_extsize()
[all …]
Drepair.c47 struct xfs_scrub *sc, in xrep_attempt() argument
52 trace_xrep_attempt(ip, sc->sm, error); in xrep_attempt()
54 xchk_ag_btcur_free(&sc->sa); in xrep_attempt()
57 ASSERT(sc->ops->repair); in xrep_attempt()
58 error = sc->ops->repair(sc); in xrep_attempt()
59 trace_xrep_done(ip, sc->sm, error); in xrep_attempt()
66 sc->sm->sm_flags &= ~XFS_SCRUB_FLAGS_OUT; in xrep_attempt()
72 if (!sc->try_harder) { in xrep_attempt()
73 sc->try_harder = true; in xrep_attempt()
110 struct xfs_scrub *sc) in xrep_probe() argument
[all …]
Drtbitmap.c29 struct xfs_scrub *sc, in xchk_setup_rt() argument
34 error = xchk_setup_fs(sc, ip); in xchk_setup_rt()
38 sc->ilock_flags = XFS_ILOCK_EXCL | XFS_ILOCK_RTBITMAP; in xchk_setup_rt()
39 sc->ip = sc->mp->m_rbmip; in xchk_setup_rt()
40 xfs_ilock(sc->ip, sc->ilock_flags); in xchk_setup_rt()
54 struct xfs_scrub *sc = priv; in xchk_rtbitmap_rec() local
62 !xfs_verify_rtbno(sc->mp, startblock) || in xchk_rtbitmap_rec()
63 !xfs_verify_rtbno(sc->mp, startblock + blockcount - 1)) in xchk_rtbitmap_rec()
64 xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, 0); in xchk_rtbitmap_rec()
71 struct xfs_scrub *sc) in xchk_rtbitmap() argument
[all …]
Dbmap.c37 struct xfs_scrub *sc, in xchk_setup_inode_bmap() argument
42 error = xchk_get_inode(sc, ip); in xchk_setup_inode_bmap()
46 sc->ilock_flags = XFS_IOLOCK_EXCL | XFS_MMAPLOCK_EXCL; in xchk_setup_inode_bmap()
47 xfs_ilock(sc->ip, sc->ilock_flags); in xchk_setup_inode_bmap()
54 if (S_ISREG(VFS_I(sc->ip)->i_mode) && in xchk_setup_inode_bmap()
55 sc->sm->sm_type == XFS_SCRUB_TYPE_BMBTD) { in xchk_setup_inode_bmap()
56 inode_dio_wait(VFS_I(sc->ip)); in xchk_setup_inode_bmap()
57 error = filemap_write_and_wait(VFS_I(sc->ip)->i_mapping); in xchk_setup_inode_bmap()
63 error = xchk_trans_alloc(sc, 0); in xchk_setup_inode_bmap()
66 sc->ilock_flags |= XFS_ILOCK_EXCL; in xchk_setup_inode_bmap()
[all …]
Dcommon.h16 struct xfs_scrub *sc, in xchk_should_terminate() argument
27 int xchk_trans_alloc(struct xfs_scrub *sc, uint resblks);
28 bool xchk_process_error(struct xfs_scrub *sc, xfs_agnumber_t agno,
30 bool xchk_fblock_process_error(struct xfs_scrub *sc, int whichfork,
33 bool xchk_xref_process_error(struct xfs_scrub *sc,
35 bool xchk_fblock_xref_process_error(struct xfs_scrub *sc,
38 void xchk_block_set_preen(struct xfs_scrub *sc,
40 void xchk_ino_set_preen(struct xfs_scrub *sc, xfs_ino_t ino);
42 void xchk_block_set_corrupt(struct xfs_scrub *sc,
44 void xchk_ino_set_corrupt(struct xfs_scrub *sc, xfs_ino_t ino);
[all …]
Dquota.c34 struct xfs_scrub *sc) in xchk_quota_to_dqtype() argument
36 switch (sc->sm->sm_type) { in xchk_quota_to_dqtype()
51 struct xfs_scrub *sc, in xchk_setup_quota() argument
57 if (!XFS_IS_QUOTA_RUNNING(sc->mp) || !XFS_IS_QUOTA_ON(sc->mp)) in xchk_setup_quota()
60 dqtype = xchk_quota_to_dqtype(sc); in xchk_setup_quota()
63 sc->has_quotaofflock = true; in xchk_setup_quota()
64 mutex_lock(&sc->mp->m_quotainfo->qi_quotaofflock); in xchk_setup_quota()
65 if (!xfs_this_quota_on(sc->mp, dqtype)) in xchk_setup_quota()
67 error = xchk_setup_fs(sc, ip); in xchk_setup_quota()
70 sc->ip = xfs_quota_inode(sc->mp, dqtype); in xchk_setup_quota()
[all …]
Drmap.c33 struct xfs_scrub *sc, in xchk_setup_ag_rmapbt() argument
36 return xchk_setup_ag_btree(sc, ip, false); in xchk_setup_ag_rmapbt()
44 struct xfs_scrub *sc, in xchk_rmapbt_xref_refc() argument
55 if (!sc->sa.refc_cur || xchk_skip_xref(sc->sm)) in xchk_rmapbt_xref_refc()
64 error = xfs_refcount_find_shared(sc->sa.refc_cur, irec->rm_startblock, in xchk_rmapbt_xref_refc()
66 if (!xchk_should_check_xref(sc, &error, &sc->sa.refc_cur)) in xchk_rmapbt_xref_refc()
69 xchk_btree_xref_set_corrupt(sc, sc->sa.refc_cur, 0); in xchk_rmapbt_xref_refc()
75 struct xfs_scrub *sc, in xchk_rmapbt_xref() argument
81 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_rmapbt_xref()
84 xchk_xref_is_used_space(sc, agbno, len); in xchk_rmapbt_xref()
[all …]
/Linux-v4.19/drivers/clk/qcom/
Dgdsc.c59 static int gdsc_check_status(struct gdsc *sc, enum gdsc_status status) in gdsc_check_status() argument
65 if (sc->flags & POLL_CFG_GDSCR) in gdsc_check_status()
66 reg = sc->gdscr + CFG_GDSCR_OFFSET; in gdsc_check_status()
67 else if (sc->gds_hw_ctrl) in gdsc_check_status()
68 reg = sc->gds_hw_ctrl; in gdsc_check_status()
70 reg = sc->gdscr; in gdsc_check_status()
72 ret = regmap_read(sc->regmap, reg, &val); in gdsc_check_status()
76 if (sc->flags & POLL_CFG_GDSCR) { in gdsc_check_status()
95 static int gdsc_hwctrl(struct gdsc *sc, bool en) in gdsc_hwctrl() argument
99 return regmap_update_bits(sc->regmap, sc->gdscr, HW_CONTROL_MASK, val); in gdsc_hwctrl()
[all …]
/Linux-v4.19/drivers/hid/
Dhid-sony.c585 static void sony_set_leds(struct sony_sc *sc);
587 static inline void sony_schedule_work(struct sony_sc *sc, in sony_schedule_work() argument
592 if (!sc->defer_initialization) in sony_schedule_work()
593 schedule_work(&sc->state_worker); in sony_schedule_work()
596 if (sc->hotplug_worker_initialized) in sony_schedule_work()
597 schedule_work(&sc->hotplug_worker); in sony_schedule_work()
607 struct sony_sc *sc = hid_get_drvdata(hdev); in ds4_show_poll_interval() local
609 return snprintf(buf, PAGE_SIZE, "%i\n", sc->ds4_bt_poll_interval); in ds4_show_poll_interval()
617 struct sony_sc *sc = hid_get_drvdata(hdev); in ds4_store_poll_interval() local
627 spin_lock_irqsave(&sc->lock, flags); in ds4_store_poll_interval()
[all …]
/Linux-v4.19/drivers/scsi/snic/
Dsnic_scsi.c36 #define snic_cmd_tag(sc) (((struct scsi_cmnd *) sc)->request->tag) argument
112 snic_io_lock_hash(struct snic *snic, struct scsi_cmnd *sc) in snic_io_lock_hash() argument
114 u32 hash = snic_cmd_tag(sc) & (SNIC_IO_LOCKS - 1); in snic_io_lock_hash()
129 struct scsi_cmnd *sc) in snic_release_req_buf() argument
134 SNIC_BUG_ON(!((CMD_STATE(sc) == SNIC_IOREQ_COMPLETE) || in snic_release_req_buf()
135 (CMD_STATE(sc) == SNIC_IOREQ_ABTS_COMPLETE) || in snic_release_req_buf()
136 (CMD_FLAGS(sc) & SNIC_DEV_RST_NOTSUP) || in snic_release_req_buf()
137 (CMD_FLAGS(sc) & SNIC_IO_INTERNAL_TERM_ISSUED) || in snic_release_req_buf()
138 (CMD_FLAGS(sc) & SNIC_DEV_RST_TERM_ISSUED) || in snic_release_req_buf()
139 (CMD_FLAGS(sc) & SNIC_SCSI_CLEANUP) || in snic_release_req_buf()
[all …]
/Linux-v4.19/drivers/usb/atm/
Dueagle-atm.c297 #define IS_OPERATIONAL(sc) \ argument
298 ((UEA_CHIP_VERSION(sc) != EAGLE_IV) ? \
299 (GET_STATUS(sc->stats.phy.state) == 2) : \
300 (sc->stats.phy.state == 7))
591 #define uea_wait(sc, cond, timeo) \ argument
593 int _r = wait_event_interruptible_timeout(sc->sync_q, \
602 if (sc->usbatm->atm_dev) \
603 sc->usbatm->atm_dev->type = val; \
608 if (sc->usbatm->atm_dev) \
609 atm_dev_signal_change(sc->usbatm->atm_dev, val); \
[all …]
/Linux-v4.19/drivers/infiniband/hw/hfi1/
Dpio.c57 static void sc_wait_for_packet_egress(struct send_context *sc, int pause);
569 static void cr_group_addresses(struct send_context *sc, dma_addr_t *dma) in cr_group_addresses() argument
571 u32 gc = group_context(sc->hw_context, sc->group); in cr_group_addresses()
572 u32 index = sc->hw_context & 0x7; in cr_group_addresses()
574 sc->hw_free = &sc->dd->cr_base[sc->node].va[gc].cr[index]; in cr_group_addresses()
576 &((struct credit_return *)sc->dd->cr_base[sc->node].dma)[gc]; in cr_group_addresses()
585 struct send_context *sc; in sc_halted() local
587 sc = container_of(work, struct send_context, halt_work); in sc_halted()
588 sc_restart(sc); in sc_halted()
601 u32 sc_mtu_to_threshold(struct send_context *sc, u32 mtu, u32 hdrqentsize) in sc_mtu_to_threshold() argument
[all …]
/Linux-v4.19/drivers/md/
Ddm-stripe.c53 struct stripe_c *sc = container_of(work, struct stripe_c, in trigger_event() local
55 dm_table_event(sc->ti->table); in trigger_event()
74 static int get_stripe(struct dm_target *ti, struct stripe_c *sc, in get_stripe() argument
85 &sc->stripe[stripe].dev); in get_stripe()
89 sc->stripe[stripe].physical_start = start; in get_stripe()
100 struct stripe_c *sc; in stripe_ctr() local
145 sc = alloc_context(stripes); in stripe_ctr()
146 if (!sc) { in stripe_ctr()
152 INIT_WORK(&sc->trigger_event, trigger_event); in stripe_ctr()
155 sc->ti = ti; in stripe_ctr()
[all …]

12345678910>>...17