Home
last modified time | relevance | path

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

1234567

/drivers/net/wan/lmc/
Dlmc_media.c157 lmc_dummy_set_1 (lmc_softc_t * const sc, int a) in lmc_dummy_set_1() argument
162 lmc_dummy_set2_1 (lmc_softc_t * const sc, lmc_ctl_t * a) in lmc_dummy_set2_1() argument
171 lmc_hssi_init (lmc_softc_t * const sc) in lmc_hssi_init() argument
173 sc->ictl.cardtype = LMC_CTL_CARDTYPE_LMC5200; in lmc_hssi_init()
175 lmc_gpio_mkoutput (sc, LMC_GEP_HSSI_CLOCK); in lmc_hssi_init()
179 lmc_hssi_default (lmc_softc_t * const sc) in lmc_hssi_default() argument
181 sc->lmc_miireg16 = LMC_MII16_LED_ALL; in lmc_hssi_default()
183 sc->lmc_media->set_link_status (sc, LMC_LINK_DOWN); in lmc_hssi_default()
184 sc->lmc_media->set_clock_source (sc, LMC_CTL_CLOCK_SOURCE_EXT); in lmc_hssi_default()
185 sc->lmc_media->set_crc_length (sc, LMC_CTL_CRC_LENGTH_16); in lmc_hssi_default()
[all …]
Dlmc_main.c99 static void lmc_initcsrs(lmc_softc_t * const sc, lmc_csrptr_t csr_base, size_t csr_size);
104 static void lmc_reset(lmc_softc_t * const sc);
105 static void lmc_dec_reset(lmc_softc_t * const sc);
114 lmc_softc_t *sc = dev_to_sc(dev); in lmc_ioctl() local
133 if (copy_to_user(ifr->ifr_data, &sc->ictl, sizeof(lmc_ctl_t))) in lmc_ioctl()
155 spin_lock_irqsave(&sc->lmc_lock, flags); in lmc_ioctl()
156 sc->lmc_media->set_status (sc, &ctl); in lmc_ioctl()
158 if(ctl.crc_length != sc->ictl.crc_length) { in lmc_ioctl()
159 sc->lmc_media->set_crc_length(sc, ctl.crc_length); in lmc_ioctl()
160 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 …]
/drivers/staging/sbe-2t3e3/
Ddc.c20 static int dc_init_descriptor_list(struct channel *sc);
22 void dc_init(struct channel *sc) in dc_init() argument
26 dc_stop(sc); in dc_init()
37 if (sc->h.command & 16) in dc_init()
40 switch (sc->h.cache_size) { in dc_init()
54 dc_write(sc->addr, SBE_2T3E3_21143_REG_BUS_MODE, val); in dc_init()
64 dc_write(sc->addr, SBE_2T3E3_21143_REG_OPERATION_MODE, val); in dc_init()
65 if (sc->p.loopback == SBE_2T3E3_LOOPBACK_ETHERNET) in dc_init()
66 sc->p.loopback = SBE_2T3E3_LOOPBACK_NONE; in dc_init()
76 …dc_write(sc->addr, SBE_2T3E3_21143_REG_GENERAL_PURPOSE_TIMER_AND_INTERRUPT_MITIGATION_CONTROL, val… in dc_init()
[all …]
Dintr.c20 struct channel *sc = dev_to_priv(dev_instance); in t3e3_intr() local
24 sc->interrupt_active = 1; in t3e3_intr()
26 val = cpld_read(sc, SBE_2T3E3_CPLD_REG_PICSR); in t3e3_intr()
29 dev_dbg(&sc->pdev->dev, in t3e3_intr()
31 val, (sc->s.LOS << 4) | sc->s.OOF); in t3e3_intr()
32 cpld_LOS_update(sc); in t3e3_intr()
37 dc_intr(sc); in t3e3_intr()
42 exar7250_intr(sc); in t3e3_intr()
51 sc->interrupt_active = 0; in t3e3_intr()
55 void dc_intr(struct channel *sc) in dc_intr() argument
[all …]
Dctrl.c17 void t3e3_set_frame_type(struct channel *sc, u32 mode) in t3e3_set_frame_type() argument
19 if (sc->p.frame_type == mode) in t3e3_set_frame_type()
22 if (sc->r.flags & SBE_2T3E3_FLAG_NETWORK_UP) { in t3e3_set_frame_type()
23 dev_err(&sc->pdev->dev, "SBE 2T3E3: changing frame type during active connection\n"); in t3e3_set_frame_type()
27 exar7300_set_frame_type(sc, mode); in t3e3_set_frame_type()
28 exar7250_set_frame_type(sc, mode); in t3e3_set_frame_type()
29 cpld_set_frame_type(sc, mode); in t3e3_set_frame_type()
31 sc->p.frame_type = mode; in t3e3_set_frame_type()
34 void t3e3_set_loopback(struct channel *sc, u32 mode) in t3e3_set_loopback() argument
38 if (sc->p.loopback == mode) in t3e3_set_loopback()
[all …]
Dcpld.c17 #define bootrom_set_bit(sc, reg, bit) \ argument
18 bootrom_write((sc), (reg), \
19 bootrom_read((sc), (reg)) | (bit))
21 #define bootrom_clear_bit(sc, reg, bit) \ argument
22 bootrom_write((sc), (reg), \
23 bootrom_read((sc), (reg)) & ~(bit))
41 void cpld_init(struct channel *sc) in cpld_init() argument
47 cpld_val_map[SBE_2T3E3_CPLD_VAL_LOOP_TIMING_SOURCE][sc->h.slot]; in cpld_init()
48 cpld_write(sc, SBE_2T3E3_CPLD_REG_PCRA, val); in cpld_init()
52 cpld_write(sc, SBE_2T3E3_CPLD_REG_PCRB, val); in cpld_init()
[all …]
Dexar7250.c16 void exar7250_init(struct channel *sc) in exar7250_init() argument
18 exar7250_write(sc, SBE_2T3E3_FRAMER_REG_OPERATING_MODE, in exar7250_init()
23 exar7250_write(sc, SBE_2T3E3_FRAMER_REG_IO_CONTROL, in exar7250_init()
29 exar7250_set_frame_type(sc, SBE_2T3E3_FRAME_TYPE_T3_CBIT); in exar7250_init()
32 void exar7250_set_frame_type(struct channel *sc, u32 type) in exar7250_set_frame_type() argument
46 exar7250_stop_intr(sc, type); in exar7250_set_frame_type()
48 val = exar7250_read(sc, SBE_2T3E3_FRAMER_REG_OPERATING_MODE); in exar7250_set_frame_type()
68 exar7250_write(sc, SBE_2T3E3_FRAMER_REG_OPERATING_MODE, val); in exar7250_set_frame_type()
69 exar7250_start_intr(sc, type); in exar7250_set_frame_type()
73 void exar7250_start_intr(struct channel *sc, u32 type) in exar7250_start_intr() argument
[all …]
Dmain.c17 void t3e3_init(struct channel *sc) in t3e3_init() argument
19 cpld_init(sc); in t3e3_init()
20 dc_reset(sc); in t3e3_init()
21 dc_init(sc); in t3e3_init()
22 exar7250_init(sc); in t3e3_init()
23 exar7300_init(sc); in t3e3_init()
28 struct channel *sc = dev_to_priv(dev); in t3e3_if_start_xmit() local
34 sc->s.out_errors++; in t3e3_if_start_xmit()
38 if (sc->p.transmitter_on != SBE_2T3E3_ON) { in t3e3_if_start_xmit()
39 sc->s.out_errors++; in t3e3_if_start_xmit()
[all …]
Dexar7300.c16 void exar7300_init(struct channel *sc) in exar7300_init() argument
18 exar7300_write(sc, SBE_2T3E3_LIU_REG_REG1, 0); in exar7300_init()
21 exar7300_write(sc, SBE_2T3E3_LIU_REG_REG2, 0); in exar7300_init()
22 exar7300_write(sc, SBE_2T3E3_LIU_REG_REG3, 0); in exar7300_init()
23 exar7300_write(sc, SBE_2T3E3_LIU_REG_REG4, in exar7300_init()
28 void exar7300_set_loopback(struct channel *sc, u32 mode) in exar7300_set_loopback() argument
42 val = exar7300_read(sc, SBE_2T3E3_LIU_REG_REG4); in exar7300_set_loopback()
45 exar7300_write(sc, SBE_2T3E3_LIU_REG_REG4, val); in exar7300_set_loopback()
48 void exar7300_set_frame_type(struct channel *sc, u32 type) in exar7300_set_frame_type() argument
62 val = exar7300_read(sc, SBE_2T3E3_LIU_REG_REG4); in exar7300_set_frame_type()
[all …]
/drivers/net/wireless/ath/ath9k/
Dmain.c22 static void ath9k_set_assoc_state(struct ath_softc *sc,
60 static bool ath9k_has_pending_frames(struct ath_softc *sc, struct ath_txq *txq) in ath9k_has_pending_frames() argument
73 static bool ath9k_setpower(struct ath_softc *sc, enum ath9k_power_mode mode) in ath9k_setpower() argument
78 spin_lock_irqsave(&sc->sc_pm_lock, flags); in ath9k_setpower()
79 ret = ath9k_hw_setpower(sc->sc_ah, mode); in ath9k_setpower()
80 spin_unlock_irqrestore(&sc->sc_pm_lock, flags); in ath9k_setpower()
85 void ath9k_ps_wakeup(struct ath_softc *sc) in ath9k_ps_wakeup() argument
87 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in ath9k_ps_wakeup()
91 spin_lock_irqsave(&sc->sc_pm_lock, flags); in ath9k_ps_wakeup()
92 if (++sc->ps_usecount != 1) in ath9k_ps_wakeup()
[all …]
Dinit.c173 static void ath9k_deinit_softc(struct ath_softc *sc);
185 struct ath_softc *sc = (struct ath_softc *) common->priv; in ath9k_iowrite32() local
189 spin_lock_irqsave(&sc->sc_serial_rw, flags); in ath9k_iowrite32()
190 iowrite32(val, sc->mem + reg_offset); in ath9k_iowrite32()
191 spin_unlock_irqrestore(&sc->sc_serial_rw, flags); in ath9k_iowrite32()
193 iowrite32(val, sc->mem + reg_offset); in ath9k_iowrite32()
200 struct ath_softc *sc = (struct ath_softc *) common->priv; in ath9k_ioread32() local
205 spin_lock_irqsave(&sc->sc_serial_rw, flags); in ath9k_ioread32()
206 val = ioread32(sc->mem + reg_offset); in ath9k_ioread32()
207 spin_unlock_irqrestore(&sc->sc_serial_rw, flags); in ath9k_ioread32()
[all …]
Dgpio.c27 struct ath_softc *sc = container_of(led_cdev, struct ath_softc, led_cdev); in ath_led_brightness() local
28 ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, (brightness == LED_OFF)); in ath_led_brightness()
31 void ath_deinit_leds(struct ath_softc *sc) in ath_deinit_leds() argument
33 if (!sc->led_registered) in ath_deinit_leds()
36 ath_led_brightness(&sc->led_cdev, LED_OFF); in ath_deinit_leds()
37 led_classdev_unregister(&sc->led_cdev); in ath_deinit_leds()
40 void ath_init_leds(struct ath_softc *sc) in ath_init_leds() argument
44 if (AR_SREV_9100(sc->sc_ah)) in ath_init_leds()
48 sc->led_cdev.default_trigger = in ath_init_leds()
49 ieee80211_get_radio_led_name(sc->hw); in ath_init_leds()
[all …]
Drecv.c24 static inline bool ath9k_check_auto_sleep(struct ath_softc *sc) in ath9k_check_auto_sleep() argument
26 return sc->ps_enabled && in ath9k_check_auto_sleep()
27 (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP); in ath9k_check_auto_sleep()
38 static void ath_rx_buf_link(struct ath_softc *sc, struct ath_buf *bf) in ath_rx_buf_link() argument
40 struct ath_hw *ah = sc->sc_ah; in ath_rx_buf_link()
65 if (sc->rx.rxlink == NULL) in ath_rx_buf_link()
68 *sc->rx.rxlink = bf->bf_daddr; in ath_rx_buf_link()
70 sc->rx.rxlink = &ds->ds_link; in ath_rx_buf_link()
73 static void ath_setdefantenna(struct ath_softc *sc, u32 antenna) in ath_setdefantenna() argument
76 ath9k_hw_setantenna(sc->sc_ah, antenna); in ath_setdefantenna()
[all …]
Dlink.c25 struct ath_softc *sc = container_of(work, struct ath_softc, in ath_tx_complete_poll_work() local
32 txq = sc->tx.txq_map[i]; in ath_tx_complete_poll_work()
34 ath_txq_lock(sc, txq); in ath_tx_complete_poll_work()
38 ath_txq_unlock(sc, txq); in ath_tx_complete_poll_work()
44 ath_txq_unlock_complete(sc, txq); in ath_tx_complete_poll_work()
48 ath_dbg(ath9k_hw_common(sc->sc_ah), RESET, in ath_tx_complete_poll_work()
50 ath9k_queue_reset(sc, RESET_TYPE_TX_HANG); in ath_tx_complete_poll_work()
54 ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, in ath_tx_complete_poll_work()
63 struct ath_softc *sc = container_of(work, struct ath_softc, hw_check_work); in ath_hw_check() local
64 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in ath_hw_check()
[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()
49 txq = sc->tx.txq_map[IEEE80211_AC_BE]; in ath9k_beaconq_config()
59 if (!ath9k_hw_set_txq_props(ah, sc->beacon.beaconq, &qi)) { in ath9k_beaconq_config()
62 ath9k_hw_resettxqueue(ah, sc->beacon.beaconq); in ath9k_beaconq_config()
[all …]
Dxmit.c52 static void ath_tx_send_normal(struct ath_softc *sc, struct ath_txq *txq,
54 static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
56 static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
59 static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq,
61 static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
64 static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
66 static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc,
82 void ath_txq_lock(struct ath_softc *sc, struct ath_txq *txq) in ath_txq_lock() argument
88 void ath_txq_unlock(struct ath_softc *sc, struct ath_txq *txq) in ath_txq_unlock() argument
94 void ath_txq_unlock_complete(struct ath_softc *sc, struct ath_txq *txq) in ath_txq_unlock_complete() argument
[all …]
Ddebug.c49 struct ath_softc *sc = file->private_data; in read_file_debug() local
50 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in read_file_debug()
61 struct ath_softc *sc = file->private_data; in write_file_debug() local
62 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in write_file_debug()
94 struct ath_softc *sc = file->private_data; in read_file_tx_chainmask() local
95 struct ath_hw *ah = sc->sc_ah; in read_file_tx_chainmask()
106 struct ath_softc *sc = file->private_data; in write_file_tx_chainmask() local
107 struct ath_hw *ah = sc->sc_ah; in write_file_tx_chainmask()
137 struct ath_softc *sc = file->private_data; in read_file_rx_chainmask() local
138 struct ath_hw *ah = sc->sc_ah; in read_file_rx_chainmask()
[all …]
Dath9k.h63 #define ATH_TXQ_SETUP(sc, i) ((sc)->tx.txqsetup & (1<<i)) argument
114 int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd,
260 struct ath_softc *sc; member
324 int ath_startrecv(struct ath_softc *sc);
325 bool ath_stoprecv(struct ath_softc *sc);
326 u32 ath_calcrxfilter(struct ath_softc *sc);
327 int ath_rx_init(struct ath_softc *sc, int nbufs);
328 void ath_rx_cleanup(struct ath_softc *sc);
329 int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp);
330 struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype);
[all …]
/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 …]
/drivers/scsi/fnic/
Dfnic_scsi.c107 struct scsi_cmnd *sc) in fnic_io_lock_hash() argument
109 u32 hash = sc->request->tag & (FNIC_IO_LOCKS - 1); in fnic_io_lock_hash()
120 struct scsi_cmnd *sc) in fnic_release_ioreq_buf() argument
126 scsi_dma_unmap(sc); in fnic_release_ioreq_buf()
300 struct scsi_cmnd *sc, in fnic_queue_wq_copy_desc() argument
304 struct fc_rport *rport = starget_to_rport(scsi_target(sc->device)); in fnic_queue_wq_copy_desc()
318 for_each_sg(scsi_sglist(sc), sg, sg_count, i) { in fnic_queue_wq_copy_desc()
333 sc->sense_buffer, in fnic_queue_wq_copy_desc()
337 int_to_scsilun(sc->device->lun, &fc_lun); in fnic_queue_wq_copy_desc()
341 scsi_populate_tag_msg(sc, msg); in fnic_queue_wq_copy_desc()
[all …]
/drivers/md/
Ddm-stripe.c51 struct stripe_c *sc = container_of(work, struct stripe_c, in trigger_event() local
53 dm_table_event(sc->ti->table); in trigger_event()
72 static int get_stripe(struct dm_target *ti, struct stripe_c *sc, in get_stripe() argument
82 &sc->stripe[stripe].dev)) in get_stripe()
85 sc->stripe[stripe].physical_start = start; in get_stripe()
96 struct stripe_c *sc; in stripe_ctr() local
141 sc = alloc_context(stripes); in stripe_ctr()
142 if (!sc) { in stripe_ctr()
148 INIT_WORK(&sc->trigger_event, trigger_event); in stripe_ctr()
151 sc->ti = ti; in stripe_ctr()
[all …]
/drivers/staging/zcache/ramster/
Dtcp.c92 #define sclog(sc, fmt, args...) do { \ argument
93 typeof(sc) __sc = (sc); \
139 static void r2net_sc_postpone_idle(struct r2net_sock_container *sc);
140 static void r2net_sc_reset_idle_timer(struct r2net_sock_container *sc);
169 struct r2net_sock_container *sc) in r2net_set_nst_sock_container() argument
171 nst->st_sc = sc; in r2net_set_nst_sock_container()
180 static inline void r2net_set_sock_timer(struct r2net_sock_container *sc) in r2net_set_sock_timer() argument
182 sc->sc_tv_timer = ktime_get(); in r2net_set_sock_timer()
185 static inline void r2net_set_data_ready_time(struct r2net_sock_container *sc) in r2net_set_data_ready_time() argument
187 sc->sc_tv_data_ready = ktime_get(); in r2net_set_data_ready_time()
[all …]
/drivers/dma/sh/
Dsudmac.c53 #define to_sdev(sc) container_of(sc->shdma_chan.dma_chan.device, \ argument
81 static void sudmac_writel(struct sudmac_chan *sc, u32 data, u32 reg) in sudmac_writel() argument
83 iowrite32(data, sc->base + reg); in sudmac_writel()
86 static u32 sudmac_readl(struct sudmac_chan *sc, u32 reg) in sudmac_readl() argument
88 return ioread32(sc->base + reg); in sudmac_readl()
91 static bool sudmac_is_busy(struct sudmac_chan *sc) in sudmac_is_busy() argument
93 u32 den = sudmac_readl(sc, SUDMAC_CH0DEN + sc->offset); in sudmac_is_busy()
101 static void sudmac_set_reg(struct sudmac_chan *sc, struct sudmac_regs *hw, in sudmac_set_reg() argument
104 sudmac_writel(sc, sc->cfg, SUDMAC_CH0CFG + sc->offset); in sudmac_set_reg()
105 sudmac_writel(sc, hw->base_addr, SUDMAC_CH0BA + sc->offset); in sudmac_set_reg()
[all …]
/drivers/net/ethernet/broadcom/
Dsb1250-mac.c288 static int sbdma_add_rcvbuffer(struct sbmac_softc *sc, struct sbmacdma *d,
292 static void sbdma_fillring(struct sbmac_softc *sc, struct sbmacdma *d);
293 static int sbdma_rx_process(struct sbmac_softc *sc, struct sbmacdma *d,
295 static void sbdma_tx_process(struct sbmac_softc *sc, struct sbmacdma *d,
302 static void sbmac_promiscuous_mode(struct sbmac_softc *sc, int onoff);
306 static void sbmac_setmulti(struct sbmac_softc *sc);
439 struct sbmac_softc *sc = (struct sbmac_softc *)bus->priv; in sbmac_mii_read() local
440 void __iomem *sbm_mdio = sc->sbm_mdio; in sbmac_mii_read()
533 struct sbmac_softc *sc = (struct sbmac_softc *)bus->priv; in sbmac_mii_write() local
534 void __iomem *sbm_mdio = sc->sbm_mdio; in sbmac_mii_write()
[all …]

1234567