/[dynamips]/upstream/dynamips-0.2.6-RC2/nmc93c46.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /upstream/dynamips-0.2.6-RC2/nmc93c46.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

upstream/dynamips-0.2.6-RC1/nmc93c46.c revision 2 by dpavlin, Sat Oct 6 16:03:58 2007 UTC upstream/dynamips-0.2.6-RC2/nmc93c46.c revision 3 by dpavlin, Sat Oct 6 16:05:34 2007 UTC
# Line 55  void nmc93c46_check_cs(struct nmc93c46_g Line 55  void nmc93c46_check_cs(struct nmc93c46_g
55  void nmc93c46_check_clk_group(struct nmc93c46_group *g,int group_id,  void nmc93c46_check_clk_group(struct nmc93c46_group *g,int group_id,
56                                u_int old,u_int new)                                u_int old,u_int new)
57  {  {
58       struct cisco_eeprom *eeprom;
59     u_int cmd,op,addr,pos;     u_int cmd,op,addr,pos;
60     u_int clk_bit, din_bit;     u_int clk_bit, din_bit;
    m_uint16_t *data;  
61    
62     clk_bit = g->def[group_id]->clock_bit;     clk_bit = g->def[group_id]->clock_bit;
63     din_bit = g->def[group_id]->din_bit;     din_bit = g->def[group_id]->din_bit;
# Line 130  void nmc93c46_check_clk_group(struct nmc Line 130  void nmc93c46_check_clk_group(struct nmc
130  #endif  #endif
131                        
132           pos = g->state[group_id].dataout_pos++;           pos = g->state[group_id].dataout_pos++;
133           data = g->def[group_id]->data;           eeprom = g->eeprom[group_id];
134    
135           if ((data != NULL) && (addr < g->def[group_id]->data_len)) {           if (eeprom && eeprom->data && (addr < eeprom->len)) {
136              g->state[group_id].dataout_val = data[addr] & (1 << pos);              g->state[group_id].dataout_val = eeprom->data[addr] & (1 << pos);
137           } else {           } else {
138              /* access out of bounds */              /* access out of bounds */
139              g->state[group_id].dataout_val = (1 << pos);              g->state[group_id].dataout_val = (1 << pos);

Legend:
Removed from v.2  
changed lines
  Added in v.3

  ViewVC Help
Powered by ViewVC 1.1.26